{ "info": { "author": "Yugeng Hui", "author_email": "hyg@pinae org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development", "Topic :: Utilities" ], "description": "py-text\r\n============================================\r\n\r\nA suite text tools for python\r\n\r\nInstallation\r\n--------------\r\n\r\nThe lastest stable is py-text-1.2.tar.gz\r\n\r\n.. code-block:: shell\r\n\r\n python setup.py install\r\n \r\nGetting Start\r\n--------------\r\n\r\nawk demo for py-text:\r\n\r\n.. code-block:: python\r\n\r\n\tfrom text import awk\r\n\tdata = ['root:x:0:0:root:/root:/bin/bash',\r\n\t\t\t'daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin',\r\n\t\t\t'bin:x:2:2:bin:/bin:/usr/sbin/nologin']\r\n\tresut = awk.awk(data, None, ':', [0,4,5])\r\n\tprint result\r\n\r\n\t[['root', 'root', '/root'], ['daemon', 'daemon', '/usr/sbin'], ['bin', 'bin', '/bin']]\r\n\r\nstring_utils demo for py-text:\r\n\r\n.. code-block:: python\r\n\r\n\tfrom text import string_util\r\n\tprint 'substring_before : ' + string_utils.substring_before('one world one dream', 'one dream').strip() + '\\n'\r\n\tprint 'abbreviate : ' + string_utils.abbreviate('abcdef', 3, 3) + '\\n'\r\n\tprint 'count_matches : ' + string_utils.count_matches('one world one dream', 'one') + '\\n'\r\n\r\n\tsubstring_before : one world\r\n\tabbreviate : abc***\r\n\tcount_matches : 2\r\n\r\nregex_utils demo for py-text:\r\n\r\n.. code-block:: python\r\n\r\n\tfrom text import regex_util\r\n\tprint 'check_line : ' + regex_utils.check_line('.*(\\d+.\\d+.\\d+.\\d+)', 'MyIP is 192.168.199.4') + '\\n'\r\n\tprint 'parse_line : ' + str(regex_utils.parse_line('name=(\\S+), type=(\\S+)', 'name=ASA5505, type=Firewall)) + '\\n'\r\n\r\n\tcheck_line : True\r\n\tparse_line : ['ASA5505', 'Firewall']\r\n\r\nDocumentation\r\n--------------\r\n\r\nFull documentation is hosted on [HERE](). \r\nSources are available in the ``docs/`` directory.\r\n\r\nLicense\r\n--------------\r\n\r\npy-text is licensed under the Apache License, Version 2.0. See LICENSE for full license text", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/PinaeOS/py-text", "keywords": "python text string regex", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "py-text", "package_url": "https://pypi.org/project/py-text/", "platform": "", "project_url": "https://pypi.org/project/py-text/", "project_urls": { "Homepage": "https://github.com/PinaeOS/py-text" }, "release_url": "https://pypi.org/project/py-text/1.2/", "requires_dist": null, "requires_python": null, "summary": "A suite text tools for python", "version": "1.2" }, "last_serial": 1736087, "releases": { "1.2": [ { "comment_text": "", "digests": { "md5": "f679c6ca6c58378c7325492c670c8a74", "sha256": "095081d88d4621aa08d8911b175aa05e8d00f854db73949d5854053b8195d299" }, "downloads": -1, "filename": "py-text-1.2.tar.gz", "has_sig": false, "md5_digest": "f679c6ca6c58378c7325492c670c8a74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19744, "upload_time": "2015-09-24T10:08:21", "url": "https://files.pythonhosted.org/packages/59/b6/4445a396726255b1f4ac522ad09adbef1a9b3efaff458d46b6690a75440b/py-text-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f679c6ca6c58378c7325492c670c8a74", "sha256": "095081d88d4621aa08d8911b175aa05e8d00f854db73949d5854053b8195d299" }, "downloads": -1, "filename": "py-text-1.2.tar.gz", "has_sig": false, "md5_digest": "f679c6ca6c58378c7325492c670c8a74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19744, "upload_time": "2015-09-24T10:08:21", "url": "https://files.pythonhosted.org/packages/59/b6/4445a396726255b1f4ac522ad09adbef1a9b3efaff458d46b6690a75440b/py-text-1.2.tar.gz" } ] }