{ "info": { "author": "maxim orlov", "author_email": "maxx.orlov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Library for processing structured text into python object (dict or list) using templates.\n\n## Using:\n```shell script\ntext2py -t template.yml -i input.txt -o output.txt\n```\n\n```python\nimport text2py\nparser = text2py.Parser(template)\noutput = parser.parse(input_file)\n```\n\n## Template format:\n\nScalar value:\n```yaml\n- regexp: 'Volume (?P\\w+) Author (?P\\w+)'\n key: \"{volume}\"\n value: \"{author}\"\n```\n```python\n{volume: author}\n```\nDict value\n```yaml\n- regexp: 'Volume (?P\\w+) Author (?P\\w+) Review (?P)'\n key: \"volumes.{volume}\"\n values:\n - key: 'author'\n value: \"{author}\"\n - key: 'review'\n value: \"{review}\"\n```\n```python\n{'volumes' {volume: {'author': author, 'review': review}}}\n```\n\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://gitlab.com/omaxx/text2py", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "text2py", "package_url": "https://pypi.org/project/text2py/", "platform": "", "project_url": "https://pypi.org/project/text2py/", "project_urls": { "Homepage": "https://gitlab.com/omaxx/text2py" }, "release_url": "https://pypi.org/project/text2py/0.0.2/", "requires_dist": [ "PyYAML" ], "requires_python": ">=3.5", "summary": "Library for processing structured text into python object (dict or list) using templates", "version": "0.0.2" }, "last_serial": 5842669, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "ccee3afa85857fdd0c0e5a4c782683a8", "sha256": "b6eafa8936e4a4ad3924fd22e3426ef1a6b27f61a00062a22ec53063caa65ada" }, "downloads": -1, "filename": "text2py-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ccee3afa85857fdd0c0e5a4c782683a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4616, "upload_time": "2019-09-17T16:33:30", "url": "https://files.pythonhosted.org/packages/8a/1c/4541158ddc78971843e5a65e7d3903c40dccadd3835b6598ccaa74ee4a3f/text2py-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ceafd4dbe7ad150c33bee7a8bd052d88", "sha256": "174defbf3f552467b19fa644214fcafcee0da06e21174c1c8fa7334befed114d" }, "downloads": -1, "filename": "text2py-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ceafd4dbe7ad150c33bee7a8bd052d88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 2710, "upload_time": "2019-09-17T16:33:33", "url": "https://files.pythonhosted.org/packages/f6/c1/f28f7416ac459388440ae4db4095bc4db1ab466c86b56479c576ef90a969/text2py-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ccee3afa85857fdd0c0e5a4c782683a8", "sha256": "b6eafa8936e4a4ad3924fd22e3426ef1a6b27f61a00062a22ec53063caa65ada" }, "downloads": -1, "filename": "text2py-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ccee3afa85857fdd0c0e5a4c782683a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 4616, "upload_time": "2019-09-17T16:33:30", "url": "https://files.pythonhosted.org/packages/8a/1c/4541158ddc78971843e5a65e7d3903c40dccadd3835b6598ccaa74ee4a3f/text2py-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ceafd4dbe7ad150c33bee7a8bd052d88", "sha256": "174defbf3f552467b19fa644214fcafcee0da06e21174c1c8fa7334befed114d" }, "downloads": -1, "filename": "text2py-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ceafd4dbe7ad150c33bee7a8bd052d88", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 2710, "upload_time": "2019-09-17T16:33:33", "url": "https://files.pythonhosted.org/packages/f6/c1/f28f7416ac459388440ae4db4095bc4db1ab466c86b56479c576ef90a969/text2py-0.0.2.tar.gz" } ] }