{ "info": { "author": "David Steele", "author_email": "dsteele@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: User Interfaces" ], "description": "[![Build Status](https://travis-ci.org/davesteele/argparse_formatter.svg?branch=master)](https://travis-ci.org/davesteele/argparse_formatter)\n[![Coverage](https://codecov.io/gh/davesteele/argparse_formatter/branch/master/graph/badge.svg)](https://codecov.io/gh/davesteele/argparse_formatter/branch/master) \n\n\nArgparse Paragraph Formatter\n============================\n\nThis project is a simple Python module that provides\n[**argparse**](https://docs.python.org/3/library/argparse.html) formatters\nthat support more flexibility in the display of description, help, and epilog\ntext.\n\nBackground\n----------\n\nBy default, **argparse** will collapse and transform all sequences of whitespace\ninto a single space, and then wrap the text to an appropriate line length.\nThis causes all text to be transformed into a single paragraph.\n\nThere are optional **RawDescriptionHelpFormatter** and\n**RawTextHelpFormatter** classes that can be used to preserve paragraphs, but\nthey do not perform any word wrapping. What is needed are formatters that\nsupport more flexibility while still providing word wrapping.\n\nThe ParagraphFormatter\n----------------------\n\nThis module provides the **ParagraphFormatter** class. If this class is passed\nto the **argparse.ArgumentParser** creation call as the *formatter_class*\nargument, then help and epilog paragraphs, separated by single blank lines,\nwill be preserved. Word wrapping will be performed within the paragraphs.\n\nNote that **ParagraphFormatter** is implemented by overriding two private\nmethods in the default **argparse** formatter, and that the internals of that\nclass are not considered part of the **argparse** API. There is therefore a\nsmall risk that the code may break with a future standard library release. The\nmodule has been tested across all supported Python 3 versions.\n\n\nThe FlexiFormatter\n------------------\n\nAs it turns out, **ParagraphFormatter** is a more primitive version of a rich\nformatter that has been [long proposed](https://bugs.python.org/issue12806)\nfor inclusion in Python.\n\nThis module provides that **FlexiFormatter** class, with some modifications.\nThis formatter preserves line feeds and indentation, and understands bullet\nlists.\n\nFlexiFormatter has been submitted for inclusion in Python3.9 - \n[PR22129](https://github.com/python/cpython/pull/22129).\nIt would be good for this formatter to be merged - it eliminates the\nAPI-migration risk.\n\nDemo\n----\n\nThe script\n[*demo.py*](https://github.com/davesteele/argparse_formatter/blob/master/demo.py)\ndemonstrates the effect of using the ParagraphFormatter:\n\n # ./demo.py\n *************************\n Using the Default formatter\n *************************\n\n usage: demo.py [-h] [--arg ARG]\n\n optional arguments:\n -h, --help show this help message and exit\n --arg ARG This same feature would be useful for arguments that would\n benefit from more explanation. Wouldn't it?\n\n This is a multi-paragraph epilog. It is presenting data that would benefit by\n being visually broken up into pieces. It sure would be nice if it was\n represented that way.\n\n\n *************************\n Using the Paragraph formatter\n *************************\n\n usage: demo.py [-h] [--arg ARG]\n\n optional arguments:\n -h, --help show this help message and exit\n --arg ARG This same feature would be useful for arguments that would\n benefit from more explanation.\n\n Wouldn't it?\n\n This is a multi-paragraph epilog. It is presenting data that would benefit by\n being visually broken up into pieces.\n\n It sure would be nice if it was represented that way.\n\nThe [*flexidemo.py*](https://github.com/davesteele/argparse_formatter/blob/master/flexidemo.py)\nscript shows the output for **FlexiFormatter**\n\n\n *************************\n Using the Default formatter\n *************************\n\n usage: flexidemo.py [-h] [--arg ARG]\n\n optional arguments:\n -h, --help show this help message and exit\n --arg ARG This same feature would be useful for arguments that would\n benefit from more explanation. 1. It looks nicer 2. It is easier\n to read, even if some of the bullets get to be a little long.\n\n This is a multi-paragraph epilog. It is presenting data that would benefit by\n being visually broken up into pieces. It sure would be nice if it was\n represented that way. 1. This is a pretty long line, in a bullet list -\n getting longer and longer and longer 2. this isn't\n\n\n *************************\n Using the Flexi formatter\n *************************\n\n usage: flexidemo.py [-h] [--arg ARG]\n\n optional arguments:\n -h, --help show this help message and exit\n --arg ARG This same feature would be useful for arguments that would\n benefit from more explanation.\n\n 1. It looks nicer\n 2. It is easier to read, even if some of the bullets get to be\n a little long.\n\n This is a multi-paragraph epilog. It is presenting data that would benefit by\n being visually broken up into pieces.\n\n It sure would be nice if it was represented that way.\n\n 1. This is a pretty long line, in a bullet list - getting longer and longer\n and longer\n 2. this isn't\n\n\nInstall\n-------\n\nInstall from [PyPi](https://pypi.org/project/argparse-formatter/) with:\n\n pip install argparse-formatter\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/davesteele/argparse_formatter", "keywords": "", "license": "GPL 2.0", "maintainer": "", "maintainer_email": "", "name": "argparse-formatter", "package_url": "https://pypi.org/project/argparse-formatter/", "platform": "", "project_url": "https://pypi.org/project/argparse-formatter/", "project_urls": { "Homepage": "https://github.com/davesteele/argparse_formatter" }, "release_url": "https://pypi.org/project/argparse-formatter/1.4/", "requires_dist": null, "requires_python": "", "summary": "Paragraph-preserving formatter for argparse", "version": "1.4", "yanked": false, "yanked_reason": null }, "last_serial": 9332289, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "268080a1115d840708337fa6f9dad557", "sha256": "653009ab3c6579f76b1c51907fe94b2d6597ce618f25bca41171a3b9ae6f3890" }, "downloads": -1, "filename": "argparse_formatter-1.1.tar.gz", "has_sig": true, "md5_digest": "268080a1115d840708337fa6f9dad557", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3719, "upload_time": "2019-10-20T20:07:26", "upload_time_iso_8601": "2019-10-20T20:07:26.362788Z", "url": "https://files.pythonhosted.org/packages/49/e9/0403d0301f208ee3c7d12d526c682841f1f9fe9639d8c9b29b0247144e68/argparse_formatter-1.1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2": [ { "comment_text": "", "digests": { "md5": "3d53b7a455088f321a069ac420e995c6", "sha256": "629937b5b90b383ce9bffbfb04384dac255cad73d7687f7efe99f1bc425c39a5" }, "downloads": -1, "filename": "argparse_formatter-1.2.tar.gz", "has_sig": false, "md5_digest": "3d53b7a455088f321a069ac420e995c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5443, "upload_time": "2019-10-23T00:07:42", "upload_time_iso_8601": "2019-10-23T00:07:42.633410Z", "url": "https://files.pythonhosted.org/packages/25/68/56cb479aea54eff567e32707a27f455ace51d336b8dbc965727c85c00ae0/argparse_formatter-1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.3": [ { "comment_text": "", "digests": { "md5": "2a50d3e206f2126d5409cf74585a6e3a", "sha256": "a614acbca966a10780e15bea891c84d7cbd1bf2ba774a32881b6fac5ee15bfd3" }, "downloads": -1, "filename": "argparse_formatter-1.3.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "2a50d3e206f2126d5409cf74585a6e3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6099, "upload_time": "2021-01-13T20:31:25", "upload_time_iso_8601": "2021-01-13T20:31:25.324367Z", "url": "https://files.pythonhosted.org/packages/f0/b5/6723d37c78f455bc5aa0d3de64515c9ce7b315d5309b11d9d790cce64995/argparse_formatter-1.3.linux-x86_64.tar.gz", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "de83d47f65f1cf02c3ab121783529f23", "sha256": "577c8c3cf4b010ded32afda6ecaf8984dfb0a3590759806f5c326cdfec02d084" }, "downloads": -1, "filename": "argparse_formatter-1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "de83d47f65f1cf02c3ab121783529f23", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11921, "upload_time": "2021-01-13T20:31:24", "upload_time_iso_8601": "2021-01-13T20:31:24.333751Z", "url": "https://files.pythonhosted.org/packages/3e/04/b6d6ab266b5846bf11f9ac5c1546c34763a32680e5ef0f88272deff2bab9/argparse_formatter-1.3-py3-none-any.whl", "yanked": false, "yanked_reason": null } ], "1.4": [ { "comment_text": "", "digests": { "md5": "63df5ac545bf411815c2455b3fb9a367", "sha256": "c1ce58a68ed83d5204e1515c6f8fb52f5f32fc21bc993faa80f0b17a78090265" }, "downloads": -1, "filename": "argparse_formatter-1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "63df5ac545bf411815c2455b3fb9a367", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11917, "upload_time": "2021-02-05T20:21:19", "upload_time_iso_8601": "2021-02-05T20:21:19.011675Z", "url": "https://files.pythonhosted.org/packages/f4/d8/768708df2d25cc6483083db56521f35e1b47538dd915339c90fa8fce2e77/argparse_formatter-1.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "a7dd3f41dd25b959e77042d0612a53ad", "sha256": "35027941a1e75a1a4df21e5c40a3395d311777d9bb1cfd9744d6ff7cc28de216" }, "downloads": -1, "filename": "argparse_formatter-1.4.tar.gz", "has_sig": false, "md5_digest": "a7dd3f41dd25b959e77042d0612a53ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5727, "upload_time": "2021-02-05T20:21:20", "upload_time_iso_8601": "2021-02-05T20:21:20.506502Z", "url": "https://files.pythonhosted.org/packages/f1/46/095633f2da154b09938ab568c951ce67e67f2ae22a67f5dce922039c8202/argparse_formatter-1.4.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63df5ac545bf411815c2455b3fb9a367", "sha256": "c1ce58a68ed83d5204e1515c6f8fb52f5f32fc21bc993faa80f0b17a78090265" }, "downloads": -1, "filename": "argparse_formatter-1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "63df5ac545bf411815c2455b3fb9a367", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11917, "upload_time": "2021-02-05T20:21:19", "upload_time_iso_8601": "2021-02-05T20:21:19.011675Z", "url": "https://files.pythonhosted.org/packages/f4/d8/768708df2d25cc6483083db56521f35e1b47538dd915339c90fa8fce2e77/argparse_formatter-1.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "a7dd3f41dd25b959e77042d0612a53ad", "sha256": "35027941a1e75a1a4df21e5c40a3395d311777d9bb1cfd9744d6ff7cc28de216" }, "downloads": -1, "filename": "argparse_formatter-1.4.tar.gz", "has_sig": false, "md5_digest": "a7dd3f41dd25b959e77042d0612a53ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5727, "upload_time": "2021-02-05T20:21:20", "upload_time_iso_8601": "2021-02-05T20:21:20.506502Z", "url": "https://files.pythonhosted.org/packages/f1/46/095633f2da154b09938ab568c951ce67e67f2ae22a67f5dce922039c8202/argparse_formatter-1.4.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }