alphagov/search-analytics — pull request #5 by rboulton (2014-08-26 08:59:20+00:00)
Title: Implement proper command line argument parsing

Also, refactor non-command line oriented code out of scripts/*.py so
that the implementation of each command is available as a loadable
module. As part of this, refactor the "call_with_client()" function,
which took a callable, made a client, and called the callable with the
client as the first argument; instead, introduce a ClientContext context
manager to do the same job.