nguyenvuhung / youtube-upload

Automatically exported from code.google.com/p/youtube-upload
0 stars 0 forks source link

Implement ConfigParser #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Implement ConfigParser ( http://docs.python.org/library/configparser.html ), to 
enable support for configuration file.

+ convenient - less typing
+ security - supplying password on command line is not safe on multiuser 
machines

Original issue reported on code.google.com by rooter....@gmail.com on 20 Jun 2010 at 7:40

GoogleCodeExporter commented 9 years ago
I an aware of the /proc security issue of writing password in the command-line, 
but I don't quite see how to add support for a config file seamlessly at this 
point. Besides, only the email and password would be in the config file...

Maybe we could take the opportunity to rethink the arguments: while it's UNIX 
orthodoxy to use compulsory info as arguments (and not options), here we have 
so many that it's not a very clear command to write. What about:

$ youtube-upload --email EMAIL --password PASSWORD [OTHER OPTIONS] FILE

I know, that's the opposite you asked for, there's more to write. But all of 
this would allow to add the option --password-file to get the password from a 
file safely.

Ideas?

I've got to admit I don't like the idea of using configuration files, simple 
apps should be straightforward and direct. Automation and shorter commands can 
always be achieved through aliasing or shell wrappers.

Original comment by tokland on 20 Jun 2010 at 8:18

GoogleCodeExporter commented 9 years ago
I see, then the simplest solution for security aspect of that problem would be 
with raw_input("Password:"), example of usage:

youtube-upload myemail@gmail.com stdin anne_sophie_mutter.flv \
  "A.S. Mutter" "A.S. Mutter plays Beethoven" Music "mutter, beethoven"
Password: *******
www.youtube.com/watch?v=pxzZ-fYjeYs

or support for password file:

cat passwordfile | youtube-upload myemail@gmail.com stdin 
anne_sophie_mutter.flv \
  "A.S. Mutter" "A.S. Mutter plays Beethoven" Music "mutter, beethoven"
Password:
www.youtube.com/watch?v=pxzZ-fYjeYs

Implementation difficulty: 2 lines of code.

P.S. Excuse my bad English.

Original comment by rooter....@gmail.com on 20 Jun 2010 at 8:31

GoogleCodeExporter commented 9 years ago
Well, yeah, for now this is fairly simple to implement. Only that I'd prefer 
the more standard "-" to refer to stdin.

r58

Original comment by tokland on 20 Jun 2010 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by tokland on 13 May 2014 at 2:55