Open waldoj opened 11 years ago
I added some basic messages to provide feedback on what's happening. stdout messages can get annoying if you want to run the script in the background, so these should probably be logged and displayed only in debug mode or something. Suggestions on the best approach would be welcome.
Well, there are two design patterns: --verbose
and --quiet
. It's a matter of what you want the default to be. :) Personally, I just about always prefer some low level of verbosity by default, because that makes the program accessible to folks using it for the first time, who may otherwise be confused by the lack of output. By the time somebody needs the program to emit no output (when it runs successfully), they're invested enough to discover the quiet option. OTOH, programs default to the opposite (no output, unless verbosity is enabled), and there must be some reason why!
f029193c9d88d51295f2290b8c2f50a1ea367584 replaces print statements with logging.INFO messages and adds --quiet
mode.
bbb7b3c64f4394b35846cd597bad440231484d82 adds a progress indicator for downloads -- I'm not sure Google's API library provides a facility for checking the progress of an upload.
You're right—Google employees have said repeatedly that they don't support that. All that's plausible (at least that I can think of) is a handler that feeds chunks of a file to YouTube (say, 10 MB at a time), creating a constant upload stream, but then one that can be kept tabs on, in 10 MB increments.
But that sounds like a huge pain in the ass, and I'm not about to write that code. :)
It looks like this may be possible with the latest "experimental" version of the API. I'm not positive that everything else we're doing (e.g. getting caption tracks) is possible with that API, but if so, maybe we can move to it. If not, we could straddle -- sort of ugly, but no real reason not to.
Currently there's no way for the user to know that the upload is underway. Something (even just a message) would provide reassurance that it's functioning properly.