{ "info": { "author": "David Hymonnet", "author_email": "bougie@appartland.eu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3" ], "description": "Helpgen\n=======\n\n**helpgen** helps you to make easily help/usage message of command line tools.\n\nExample\n-------\n\nNext is a short example of how to use the library :\n::\n\n #!/usr/bin/env python\n\n import sys\n\n from helpgen.decorators import Action\n from helpgen.parser import ActionParser\n\n\n @Action('test')\n def action_test():\n \"\"\"run a test\"\"\"\n\n print(\"I AM A TEST \\o/\")\n\n\n @Action('hello', args=['word'])\n def action_hello(word):\n \"\"\"display a word\"\"\"\n\n print(\"The word is : %s\" % (word,))\n\n\n def main():\n parser = ActionParser(description=\"helpgen test script\")\n parser.compile()\n\n try:\n parser.process()\n except:\n return 1\n else:\n return 0\n\n if __name__ == \"__main__\":\n sys.exit(main())\n\nThis peace of code will produce these help messages :\n\n- generic help message:\n\n::\n\n $ ./test.py -h\n usage: test.py [-h] {test,hello} ...\n\n helpgen test script\n\n positional arguments:\n {test,hello}\n test run a test\n hello display a word\n\n optional arguments:\n -h, --help show this help message and exit\n\n- help message for test sub command:\n\n::\n\n $ ./test.py test -h\n usage: test.py test [-h]\n\n optional arguments:\n -h, --help show this help message and exit\n\n- help message for hello sub command:\n\n::\n\n $ ./test.py hello -h\n usage: test.py hello [-h] word\n\n positional arguments:\n word\n\n optional arguments:\n -h, --help show this help message and exit\n\n- and, it works fine :\n\n::\n\n $ ./test.py test\n I AM A TEST \\o/\n $ ./test.py hello \"\\_o<~ KOIN\"\n The word is : \\_o<~ KOIN", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bougie/helpgen", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "helpgen", "package_url": "https://pypi.org/project/helpgen/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/helpgen/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/bougie/helpgen" }, "release_url": "https://pypi.org/project/helpgen/0.1/", "requires_dist": null, "requires_python": null, "summary": "Argparse frontend library to help making software\nusage message", "version": "0.1" }, "last_serial": 1423903, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6b0d5fde8944baf04a918d45a7116536", "sha256": "467479ed2cdee53f42eb60d1d5e5239b673246f89e56f52f8dce78ac4382c409" }, "downloads": -1, "filename": "helpgen-0.1.tar.gz", "has_sig": false, "md5_digest": "6b0d5fde8944baf04a918d45a7116536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1540, "upload_time": "2015-02-14T18:19:45", "url": "https://files.pythonhosted.org/packages/24/2a/a7e569b9ac610f473f656867dae18a7d8e82a8ec3f96e957ee59c3f2a82b/helpgen-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b0d5fde8944baf04a918d45a7116536", "sha256": "467479ed2cdee53f42eb60d1d5e5239b673246f89e56f52f8dce78ac4382c409" }, "downloads": -1, "filename": "helpgen-0.1.tar.gz", "has_sig": false, "md5_digest": "6b0d5fde8944baf04a918d45a7116536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1540, "upload_time": "2015-02-14T18:19:45", "url": "https://files.pythonhosted.org/packages/24/2a/a7e569b9ac610f473f656867dae18a7d8e82a8ec3f96e957ee59c3f2a82b/helpgen-0.1.tar.gz" } ] }