{ "info": { "author": "Randy Syring", "author_email": "rsyring@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License" ], "description": "Introduction\n---------------\n\nBlazeCommandHelper (BCH) is a framework that facilitates the quick creation of\nshell and batch scripts. It provides a core command (bch) which locates\nsub-commands from system dirs, user dirs, and installed python packages\n(through the \"blazech.commands\" setuptools endpoint).\n\nIt also provides a library for quickly creating console applications based on\nthe argparse parser.\n\nFeatures\n---------------\n\n* locates plugin commands from various places\n* provides logging facilities\n* provides configuration file facilities (needs work)\n\nThe goal is to have an API that facilitates interaction between the environment,\ncommand line options, and configuration files ala `pip `_.\n\nUsage\n---------------\n\nInstall BCH using easy_install or pip. Once installed, create a file for your\nfirst command::\n\n # file location:\n # *nix: ~/.blazech/command_hwp.py\n # windows: %APPDATA%\\.blazech\\command_hwp.py\n\n # file contents\n from blazech.commands import BaseCommand\n\n class Command(BaseCommand):\n name = 'hello-world'\n help = 'say hello'\n\n def create_arguments(self):\n #self.parser is the argparse parser for this sub-command\n self.parser.add_argument(\n '-n', '--name',\n help='who do you want to say hello to',\n default='world'\n )\n\n def execute(self, args):\n print 'hello %s' % args.name\n\nto run::\n\n # bch -h\n usage: bch [-h] [-v] [-q] {hello-world} ...\n\n positional arguments:\n {hello-world}\n hello-world say hello\n <...snip...>\n\n $ bch hello-world\n hello world\n\n $ bch hello-world -n foo\n hello foo\n\nAlternate Usage\n--------------------\n\nBCH can also be used as a library to help quickly create commands line\nscripts::\n\n # setup.py\n #<...snip...>\n entry_points=\"\"\"\n [console_scripts]\n fooapp = foopackage.commands:script_entry\n \"\"\"\n\nRun `python setup.py develop` (or install, etc.). Then, you will need::\n\n # foopackage.commands\n from blazech.application import Application\n from blazech.commands import BaseCommand\n\n def script_entry():\n app = Application('fooapp')\n app.load_commands(globals())\n # could also use\n # import foopackage.altcommands\n # app.load_commands(foopackage.altcommands)\n app.run_cmd()\n\n class BarCommand(BaseCommand):\n name = 'bar'\n help = 'process bar file'\n\n def create_arguments(self):\n #self.parser is the argparse parser for this sub-command, see\n # argparser docs for usage\n self.parser.add_argument(\n 'fpath',\n help = 'path of the file to process',\n )\n\n def execute(self, args):\n if args.fpath:\n print 'bar file is: %s' % args.fpath\n\nYou should then be able to::\n\n $ fooapp -h\n $ fooapp bar -h\n $ fooapp bar ../my/bar/file.txt\n\n\nQuestions & Comments\n---------------------\n\nPlease visit: http://groups.google.com/group/blazelibs\n\nCurrent Status\n---------------\n\nPrimary use cases work for me, but b/c of time constraints will probably move\nforward slowly.\n\nThe `development version `_\nis installable with ``easy_install BlazeCommandHelper==dev``.\n\n\nChangelog\n---------------\n\n0.2.0 -- 2011.04.29\n===================\n\n* feature: added support to be used as a library\n* bug: fixed some setup related bugs\n* bug: fix windows drive calculation\n* bug: reworked tests, all tests are now passing", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/rsyring/blazech/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "BlazeCommandHelper", "package_url": "https://pypi.org/project/BlazeCommandHelper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/BlazeCommandHelper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/rsyring/blazech/" }, "release_url": "https://pypi.org/project/BlazeCommandHelper/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "A framework that facilitates shell and batch scripting in Python", "version": "0.2.1" }, "last_serial": 802465, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1b1620c9cbabfdbb9372e43eab823b1c", "sha256": "4434bd737193028497b10d68e97bc93978e3cd214f6fbdbf9be6451dd6439cea" }, "downloads": -1, "filename": "BlazeCommandHelper-0.1-py2.6.egg", "has_sig": false, "md5_digest": "1b1620c9cbabfdbb9372e43eab823b1c", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 19809, "upload_time": "2010-12-08T23:18:26", "url": "https://files.pythonhosted.org/packages/80/e6/b82f2f025c71d1d82361fc07c6fabd2ee68cc8b43641b45d4a3a0346dcaa/BlazeCommandHelper-0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e3542b7685b9be61cc2db6c9c2e97fc7", "sha256": "1183ea2d853a566e9d6541e6fc74f9c739923c8148040c8f8a471ea3cfbdeb7f" }, "downloads": -1, "filename": "BlazeCommandHelper-0.1.tar.gz", "has_sig": false, "md5_digest": "e3542b7685b9be61cc2db6c9c2e97fc7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9258, "upload_time": "2010-12-08T23:18:25", "url": "https://files.pythonhosted.org/packages/35/5b/1cb8456726e0ca0bf7f3a3a879407e1b745c306be75eca64d616305485b4/BlazeCommandHelper-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "878f958e5efb21e75ce54df0b87eb071", "sha256": "92033cc8f55c228393e863f2ea5960094a865ac38161dcf513b1ee758a335591" }, "downloads": -1, "filename": "BlazeCommandHelper-0.1.1-py2.6.egg", "has_sig": false, "md5_digest": "878f958e5efb21e75ce54df0b87eb071", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 56887, "upload_time": "2010-12-09T00:52:50", "url": "https://files.pythonhosted.org/packages/c2/0e/588f0612fecba282917ada195db4601fe3ac1578e514ca033d89152a0413/BlazeCommandHelper-0.1.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e3bad21f70502b58ec442c6727d85cf1", "sha256": "786754f2110772d46a9a9b00f5960640060e0090cc0c719dd933ff3b7f7932d6" }, "downloads": -1, "filename": "BlazeCommandHelper-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e3bad21f70502b58ec442c6727d85cf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21234, "upload_time": "2010-12-09T00:52:49", "url": "https://files.pythonhosted.org/packages/73/e4/646fab810533d497332438f08f802da26aabdf553f5a76a43a8dbdb24aa9/BlazeCommandHelper-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "28b1bb7f4eacc61f331a4941bcaa5997", "sha256": "0a4a667d755fd85386995c6e0da0be4f325b8bfc27361d62b19ffbacea2924e6" }, "downloads": -1, "filename": "BlazeCommandHelper-0.2.0.tar.gz", "has_sig": false, "md5_digest": "28b1bb7f4eacc61f331a4941bcaa5997", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22904, "upload_time": "2011-04-29T16:31:31", "url": "https://files.pythonhosted.org/packages/ab/cb/47d85aa253613706b3b752f1b0062556cfec1144abdb9d0606ce20efd0e4/BlazeCommandHelper-0.2.0.tar.gz" } ], "0.2.1": [] }, "urls": [] }