samjarman/autolift — pull request #2 by Aupajo (2013-10-28 10:08:16+00:00)
Title: Command line friendly

I mainly just did this as an exercise to try out argparse, but here's how I would probably tackle something like this. Feel free to accept the PR or not. I won't feel hurt if you don't :)

The changes:

* Added a shebang and adjusted the file permissions – this means I can run the script by itself without the `python` prefix, making it easy to install somewhere in my $PATH
* Adopt [argparse](http://docs.python.org/2/howto/argparse.html) for options – it's self-documenting, checks for types, and gives me command-line help, so I can call it on a whim without having to remember anything

I'm in the midst of rebuilding my OS X development environment, so I haven't tested this with the unirest library yet, just the argparse stuff. Make sure you check it works as expected before merging :)