That way, it's easy to obtain the respective precompiled binary, as
well as seeing the source-code.
Overall, it makes promoting the tools easier as the CLI docs can be
linked directly.
Closes#108
[skip ci]
All assets are configured via shared.yaml and are located elsewhere in
the web. This could lead to broken assets at some point, but I am just
risking it for know, knowing that it's easily done to have local
resources.
Closes#106
[skip ci]
Previously we would define information about the program types
in two places, once for the index, and once per program type.
Now within the index.html, we just load the respective program type
information to have access to the latest at all times.
Closes#104
[skip ci]
Previously you would only see "BadRequest ... " without the information
that would actually help you to understand what the cause of the issue
is.
Now we will print all the information we have, accordingly, which
greatly improves usability.
Closes#103
[skip ci]
That way, whenever the extended help of a method (e.g. apis get-rest)
is queried, you can easily jump to the online docs to get details about
required data-structures or parameters for instance.
[skip ci]
Without all that clutter, it's so much more enjoyable to read the
output.
The implementation is based on a suggestion of @erickt, which is
converts into a json::Value (able to represent any json structure),
on which the filtering is applied.
If we should ever implement pretty-printing in json-tools, we might
still consider using these capabilities instead, as we would avoid
building potentially large datastructures, all we would need is
a sufficiently large destination buffer which is a single alloc and
a consecutive region in memory.
Closes#102
[skip ci]
Previously reserialization of token streams with removed null values
was performed on a byte-per-byte basis, which was quite inefficient
to say the least.
Now it uses `io::copy` to copy in chunks of 65kb, which makes out
our throughput and should deliver about 150MB/s at least.
Some servers, like youtube, reject null values possibly thanks to
the reliance on parts. Now we are filtering them (in a very inefficient,
but working way), which seems to be fine with the servers.
Effectively, we seem to be able now to upload videos ... .
More testing required !
Instead of using multiple lines to add vectors up involving iterators,
I just add slices together. This should produce less, and possibly
faster machine code, with less ascii code.
Downloads tested with drive2, and are verified to be working !
Close#97
Global params were repeated per method, even though they were global,
per API. Now they are kept in vectors and used at runtime, accordingly.
We save a little bit of code, have simple matches, and less repition.
It's unclear if this reduces the size of the binary though ... or the
compile times, as the extra loop is an extra loop after all ;).
Still need to test the download mode using drive1
Related to #97
[skip ci]
* functionality is cursor-aware, and fixes the actual string the user
passed in. That way, it is made very clear how the suggested value
is to be used.
* it's a known weakness of the implementation that it operates on a
flattened list of field names, and thus may make nonsensical
suggestions.
* added punctuation to all errors
Fixes#67
[skip ci]
Previously the local stack variable would be used even though it
wasn't initialized as there were no upload flags. Now this only
happens if there are media params.
[skip ci]
* As `possible_values()` applies to all arguments, we cannot use it
anymore but have to check the UploadProtocol type ourselves.
Besides that, switching to the latest `clap` simplified our lives
a little.
* ajusted docs to not enforce using `-r` all the time
Fixes#92
[skip ci]
When uploading using the resumable protocol, we are now telling the
delegate to forget the previously stored URL after successful upload.
Previously it would have tried to return such a URL and thus made
the system retry uploading a file that was already uploaded.
Fixes#85
[skip ci]
* Use `Result` everywhere, instead of Option or tuples
* Properly handle error occurring after the dry-run. We do it in an
extensible way, in case we need to do more than handle invalid output
files at some point. Output files that could not be opened will now
result in a nice error message with all the information we have.
Fixes#66
* More detailed error type for JsonTokenStorage
* removed all traces of rustc_serialize
* use pretty-printers everywhere to allow writing human-readable json
files for secretes and for tokens
Fixes#93
* adjust documentation to resemble actual upload flag semantics. It was
still using the one previously used in docopt.
* Make -m <mime-type> optional, defaulting to 'application/octet-stream'
Should have been fixed alongside of #81
* CallType now represents either Upload or Standard calls, whereas
the Upload variant is represented by the UploadProtocol enum.
That way it's clear what happens, and we don't mix orthogonal concepts
in one enumeration just for convenience.
All tested APIs seem to build, verified
* upload
* download
* request structures
* parameters
* scopes
* config-dir
* debug[-auth]
Fixes#81
* mkdoc docs grammar is now hierarchical, making the command structure
more obvious and easier to understand. It's a nice addition to the
auto-generated, hierachical usage of clap.
* UploadProtocol enum is now CallType, to ease handling the different
ways the Call has to be executed. It looks quite clean, even though
combining upload protocols and the calltype is a bit hacky.
* `--version` now includes the API revision we embody
(using crate_version())
* Allow multiple scopes to be specified, instead of just one. Previously
this was problemantic due to argument parsing of docopt being greedy.
However, this also means we have to specify the `-r` flag for each
invocation. See https://github.com/kbknapp/clap-rs/issues/89 .
* Adapted to new signature of `Arg::possible_values()` and used the
previously orphaned `UploadProtocol` enum.
* Deduplicated code a little by adding the new `opt_values()` generator
function.
Related to #81
As IntoIter is only implemented for slices up a sice of 32.
DFAReporting though will reach 55, at least.
Also added dfareporting-cli code to show how stackoverflow issues can be
circumvented efficiently.
We will try to wait for https://github.com/kbknapp/clap-rs/issues/87
to allow us to use the enumeration instead of strings, as well as
an iterator, which will look more idiomatic in the end.
We are currently setting everything up at runtime, and manage to get
nearly all information into it, except for the more complex
`-u (simple|resumable) <file> <mime>` flag.
Fixes#87
Related to #81
We do this in the hopes to circumvent a stack overflow.
This means we will setup the parser entirely at runtime, which actually
saves a little bit of code.
This is known to work with the master of hyper. It's probably OK
to keep it, preparing for the next release and under the assupmtion
that I will not be releasing binaries for a while.
Previously, the space was barely visible, confusing even myself :).
Now it's clear, using 4 spaces, that there is a cursor invocation
followed by a key-value pair.