{ "info": { "author": "William Minchin", "author_email": "w_minchin@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "minchin.text\n============\n\nPython library for text formatting on the command line.\n\nAvailable Data\n---------------\n\n\\_\\_version\\_\\_\n```````````````\nlibrary version.\n\nre_ansi_control_codes\n`````````````````````\nCompiled regex pattern for ANSI control codes, including colors.\n\nre_weburl\n`````````\nCompiled regex pattern for web URL's -- http, https, and naked domains like \"example.com\"\n\nre_allurl\n`````````\nCompiled regex pattern to match all URL's, including \"mailto:foo@example.com\",\n\"x-whatever://foo\", etc.\n\nAnswers\n```````\nAn Enum containing the possible query answers. Current contains ``YES``,\n``NO``, ``QUIT``, ``ALL``, and ``NONE``. ``YES`` and ``ALL`` are \"truth-y\"\nwhile ``NO``, ``QUIT``, and ``NONE`` are \"false-y\".\n\n\nAvailable Commands\n------------------\n\nlength_no_ansi(mystring)\n````````````````````````\nTakes a string, strips out the ANSI escape codes\n(used for colouring terminal output, etc.), and returns\nthe length of the resulting string\n\ncentered (mystring, linewidth=None, fill=\" \")\n`````````````````````````````````````````````\nTakes a string, centres it, and pads it on both sides. Default ``linewidth`` is\none less than the console width.\n\nclock_on_right(mystring)\n````````````````````````\nTakes a string, and prints it with the time right aligned\n\nquery_yes_no(question, default=\"yes\")\n`````````````````````````````````````\nAsk a yes/no question via raw_input() and return their answer.\n\n- \"question\" is a string that is presented to the user.\n- \"default\" is the presumed answer if the user just hits . It must be\n \"yes\" (the default), \"no\" or None (meaning an answer is required of the\n user).\n- Returns one of Answer.YES or Answer.NO\n\nquery_yes_no_all(question, default=\"yes\")\n`````````````````````````````````````````\nAsk a yes/no/all question via raw_input() and return their answer.\n\n- \"question\" is a string that is presented to the user.\n- \"default\" is the presumed answer if the user just hits . It must be\n \"yes\" (the default), \"no\", \"all\" or None (meaning an answer is required of\n the user).\n- Returns one of Answer.YES, Answer.NO, or Answer.ALL\n\ndef query_yes_quit(question, default=\"quit\")\n````````````````````````````````````````````\nAsk a yes/quit question via raw_input() and return their answer.\n\n- \"question\" is a string that is presented to the user.\n- \"default\" is the presumed answer if the user just hits . It must be\n \"yes\" (the default), \"quit\" or None (meaning an answer is required of the\n user).\n- Returns one of Answer.YES or Answer.QUIT\n\nquery_yes_no_all_none(question, default=\"yes\")\n``````````````````````````````````````````````\nAsk a yes/no/all/none question via raw_input() and return their answer.\n\n- \"question\" is a string that is presented to the user.\n- \"default\" is the presumed answer if the user just hits . It must be\n \"yes\" (the default), \"no\", \"all\", \"none\" (i.e. the string) or None (meaning\n an answer is required of the user).\n- Returns one of Answer.YES, Answer.NO, Answer.ALL, or Answer.NONE\n\nwait(sec)\n`````````\nPrints a timer with the format 0:00 to the console,\nand then clears the line when the timer is done.\n\ntitle(mytitle)\n``````````````\nTakes ``mytitle``, centers it, and prints it in yellow letters on a blue\nbackground.\n\nsubtitle(mysubtitle)\n````````````````````\nTakes ``mysubtitle``, centers it, and prints it in bright (white) letters on a\nnormal (black) background.\n\nrainbow_print(text, offset=0)\n`````````````````````````````\nPrints out ``text`` and prints it in a cycle of rainbow colors!\n\n\nprogressbar (class)\n-------------------\n\nThis class is used to create and then update a 'progress bar', like:\n\n.. code-block:: shell\n\n [================> ] 17 / 70\n\n\nprogressbar(current=0, maximum=100, bar_color=colorama.Fore.GREEN)\n``````````````````````````````````````````````````````````````````\nCreates a progress bar class. Prints the progress bar.\n\nprogressbar.update(currently=None)\n``````````````````````````````````\nUpdates the value of the progress bar and prints it.\n\nprogressbar.reset()\n```````````````````\nSets the value of the progress bar to 0 (zero) and prints it.\n\nCode\n----\n\nThe code is available at `https://github.com/MinchinWeb/minchin.text `_\n\nContributions are welcome!\n\nTests\n-----\nLocated in the `test` folder. Each is a \"visual test\", so they need to be run and the output manually examined.\n\nLicense\n-------\nThe code is licensed under the MIT license. See that attached `LICENSE` file.\n\n\nv 6.0.0 [2019-02-08]\n====================\n\n- [BREAKING CHANGE] queries now return one of `Answer.YES`, `Answer.NO`,\n `Answer.QUIT`, `Answer.ALL`, or `Answer.NONE`, as appropriate. `YES` and\n `ALL` are \"Truth-y\", while `NO`, `QUIT`, and `NONE` are \"False-y\"\n- added `query_yes_no_all_none()`\n- added `rainbow_print()` to print strings in all the colours!\n\n\nv 5.1.1 [2017-10-03]\n====================\n\n- allow `setup.py` to work with versions of Python before 3.6\n- remove hardcoded terminal width of 79 characters\n\nv 5.1.0 [2017-01-29]\n====================\n\n- `minchin.text.progressbar()` will only print (by default) every 0.1 seconds\n- fix progressbar bug where \"overfull\" bars would go on to multiple lines\n- add `get_terminal_size()`\n- upgrade release machinery\n\nv 5.0 [2015-06-10]\n==================\n\n- move package to `minchin.text`\n- add tests for `minchin.text.centered()`\n- add end character to progress bar\n- add documentation to README.rst\n\nv 4.4 [2014-10-26]\n==================\n\n- typographic changes to allow wmtext to work in Python 3\n\nv 4.1 [2014-03-10]\n==================\n\n- allow access as a direct object. i.e. use `import wmtext` rather than `from wmtext import wmtext`\n\nv 4.0 [2014-02-06]\n==================\n\n- packaged as a separate module\n- added progress bar\n- first public release\n \nv 3.2 [2014-02-02]\n==================\n\n- add `length_no_ansi()` allowing you to determine the length of a string after stripping out ANSI codes.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MinchinWeb/minchin.text", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "minchin.text", "package_url": "https://pypi.org/project/minchin.text/", "platform": "any", "project_url": "https://pypi.org/project/minchin.text/", "project_urls": { "Homepage": "https://github.com/MinchinWeb/minchin.text" }, "release_url": "https://pypi.org/project/minchin.text/6.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python library for text formatting on the command line.", "version": "6.0.0" }, "last_serial": 4799701, "releases": { "5.0.0": [], "5.0.1": [ { "comment_text": "", "digests": { "md5": "956c8ac6d63a0010a3bcdfc7f2170aa8", "sha256": "18f867f6558da4b25790c012e8133377212b70bae82cf19cc30216b23ed98b2e" }, "downloads": -1, "filename": "minchin.text-5.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "956c8ac6d63a0010a3bcdfc7f2170aa8", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 8997, "upload_time": "2015-06-10T21:59:46", "url": "https://files.pythonhosted.org/packages/52/6c/7e5e701909b7cb519dacb5f90fa22755c98bb6eaf46198206ac9ce443439/minchin.text-5.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f644bfdbc612a1638675fe091d87a23", "sha256": "b2079bbcec5c9dbe259827f251ad471fcaa1d3eb816a6f98f7dbcf11c47a136d" }, "downloads": -1, "filename": "minchin.text-5.0.1-py3.4.egg", "has_sig": false, "md5_digest": "0f644bfdbc612a1638675fe091d87a23", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 10759, "upload_time": "2015-06-10T21:59:57", "url": "https://files.pythonhosted.org/packages/e7/07/863e22c9887868ffe818ae48eb0b5fbbad9a6b09b82e7fc904feff3a8f8a/minchin.text-5.0.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "5b08503af18f62cbfd8ca53f71dd1791", "sha256": "57011b18ee528d2b0d2b6eca19ba391db045130b32cb2dd28c3edfb6ebd52ded" }, "downloads": -1, "filename": "minchin.text-5.0.1.zip", "has_sig": false, "md5_digest": "5b08503af18f62cbfd8ca53f71dd1791", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13394, "upload_time": "2015-06-10T21:59:27", "url": "https://files.pythonhosted.org/packages/94/e8/e91d429dcfa9706b6361f0daef036e396adc484d5dc3f1295a98080d73ed/minchin.text-5.0.1.zip" } ], "5.1.0": [ { "comment_text": "", "digests": { "md5": "9b88d08b2aa0214b5e9dec9947d0cd48", "sha256": "61d85494f0994cb8ebfdaa0995d6c5281e8447d2881b07f936dfc8db71e04c7e" }, "downloads": -1, "filename": "minchin.text-5.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9b88d08b2aa0214b5e9dec9947d0cd48", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10517, "upload_time": "2017-01-30T03:04:20", "url": "https://files.pythonhosted.org/packages/08/34/66ee952d97c2ad8d4048517c8254dee15150c5b96502f15793ccd781811b/minchin.text-5.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb1964e78be09b9d78b6db2c00ff8aaf", "sha256": "37bc1b6184453db8e180a0192a25b8e558486cd2267d6dc2cae8470df341347e" }, "downloads": -1, "filename": "minchin.text-5.1.0.tar.gz", "has_sig": false, "md5_digest": "eb1964e78be09b9d78b6db2c00ff8aaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9158, "upload_time": "2017-01-30T03:04:03", "url": "https://files.pythonhosted.org/packages/41/6d/03d814d0783e2630d3b4ff7b2f591cbc42b4ec26c22183a6b7e969eaa79b/minchin.text-5.1.0.tar.gz" } ], "5.1.1": [ { "comment_text": "", "digests": { "md5": "565c6e806aa6774211e6b9ee6178fb52", "sha256": "edf63d5e9653d40c77ecd186cbbfdc2c48fac4f57a03f6656dc92e4a325f8dfe" }, "downloads": -1, "filename": "minchin.text-5.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "565c6e806aa6774211e6b9ee6178fb52", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10758, "upload_time": "2017-10-03T23:33:11", "url": "https://files.pythonhosted.org/packages/e3/c8/7febe32bba2a98adf4b2b585658ff9722eba1de59895f31ba835919ca7e7/minchin.text-5.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77c6b14f47e28bd5fe9d4175961db248", "sha256": "88a900b65804e78842f82b2da4ef60b7cbb2fc4e5807fbec535b1bb4fcc5592a" }, "downloads": -1, "filename": "minchin.text-5.1.1.tar.gz", "has_sig": false, "md5_digest": "77c6b14f47e28bd5fe9d4175961db248", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9363, "upload_time": "2017-10-03T23:32:53", "url": "https://files.pythonhosted.org/packages/ff/77/e5a718fa7d5d805fe773a4c9e766c832160571bd4e5238c3548624f910d0/minchin.text-5.1.1.tar.gz" } ], "6.0.0": [ { "comment_text": "", "digests": { "md5": "3930b2b917327115879af14d8ba0d5b8", "sha256": "d55db3584504e9787eca849ccb008f9041156aa41e3139319ec57645ce625d7c" }, "downloads": -1, "filename": "minchin.text-6.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3930b2b917327115879af14d8ba0d5b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9560, "upload_time": "2019-02-09T16:23:08", "url": "https://files.pythonhosted.org/packages/b6/f8/9f774305a941bf2fe4522a7d9b061508240f20ac3ad9d541f9d69a054a84/minchin.text-6.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06af9651ebd659817fb4922a09ce0960", "sha256": "6ec484ec4982d9dc1d369f8f6596cf33f5f836c514e57ad67dd06e4b75d8d931" }, "downloads": -1, "filename": "minchin.text-6.0.0.tar.gz", "has_sig": false, "md5_digest": "06af9651ebd659817fb4922a09ce0960", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11651, "upload_time": "2019-02-09T16:22:37", "url": "https://files.pythonhosted.org/packages/30/94/5a519a5c7ada6873c540697fecd1d45f1f368248f7504f6bb817a36bd601/minchin.text-6.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3930b2b917327115879af14d8ba0d5b8", "sha256": "d55db3584504e9787eca849ccb008f9041156aa41e3139319ec57645ce625d7c" }, "downloads": -1, "filename": "minchin.text-6.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3930b2b917327115879af14d8ba0d5b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9560, "upload_time": "2019-02-09T16:23:08", "url": "https://files.pythonhosted.org/packages/b6/f8/9f774305a941bf2fe4522a7d9b061508240f20ac3ad9d541f9d69a054a84/minchin.text-6.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "06af9651ebd659817fb4922a09ce0960", "sha256": "6ec484ec4982d9dc1d369f8f6596cf33f5f836c514e57ad67dd06e4b75d8d931" }, "downloads": -1, "filename": "minchin.text-6.0.0.tar.gz", "has_sig": false, "md5_digest": "06af9651ebd659817fb4922a09ce0960", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11651, "upload_time": "2019-02-09T16:22:37", "url": "https://files.pythonhosted.org/packages/30/94/5a519a5c7ada6873c540697fecd1d45f1f368248f7504f6bb817a36bd601/minchin.text-6.0.0.tar.gz" } ] }