{ "info": { "author": "David L. Day", "author_email": "dday376@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "narrative\n===========\n\n.. image:: https://img.shields.io/pypi/v/narrative.svg\n :target: https://pypi.python.org/pypi/narrative\n :alt: Latest PyPI version\n\n.. image:: https://travis-ci.org/prosegrinder/python-narrative.svg?branch=master\n :target: https://travis-ci.org/prosegrinder/python-narrative\n :alt: Latest Travis CI build status\n\n.. image:: https://api.codacy.com/project/badge/Grade/199d8dcecc4345249c704325bec9cf7c\n :target: https://www.codacy.com/app/ProseGrinder/python-narrative?utm_source=github.com&utm_medium=referral&utm_content=prosegrinder/python-narrative&utm_campaign=Badge_Grade\n :alt: Latest Codacy Coverage Report\n\nA small Python package for splitting text into dialogue and narrative.\n\nInstallation\n------------\n\n``narrative`` is available on PyPI. Simply install it with ``pip``::\n\n $ pip install narrative\n\nYou can also install it from source::\n\n $ git clone https://github.com/prosegrinder/python-narrative.git\n Cloning into 'python-narrative'...\n ...\n\n $ cd python-narrative\n $ python setup.py install\n ...\n\nUsage\n-----\n\n``narrative`` splits a piece of prose into narrative and dialogue components. The main function ``split()`` will return a dict containing both ``narrative`` and ``dialogue`` components::\n\n >>> import narrative\n >>> text = '\"Hello,\" he said. \"How are you today?\"'\n >>> narrative.split(text)\n {'dialogue': ['\"Hello,\"', '\"How are you today?\"'], 'narrative': ['', ' he said. ', '']}\n\nThere are two other helper functions as well.\n\n``get_dialogue()`` returns only the dialogue components::\n\n >>> narrative.get_dialogue(text)\n ['\"Hello,\"', '\"How are you today?\"']\n\n``get_narrative()`` returns a dict containing all first, second, and third person pov words::\n\n >>> narrative.get_dialogue(text)\n ['', ' he said. ', '']\n\nNote: The empty strings are a feature of Python's ``split()`` function. See `Why are empty strings returned in split() results?`_ for an explanation.\n\nAuthors\n-------\n\n``narrative`` was written by `David L. Day `_.\n\n.. _`Why are empty strings returned in split() results?`: https://stackoverflow.com/questions/2197451/why-are-empty-strings-returned-in-split-results#2197493\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/prosegrinder/python-narrative", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "narrative", "package_url": "https://pypi.org/project/narrative/", "platform": "", "project_url": "https://pypi.org/project/narrative/", "project_urls": { "Homepage": "https://github.com/prosegrinder/python-narrative" }, "release_url": "https://pypi.org/project/narrative/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "A small Python package for splitting text into dialogue and narrative.", "version": "0.1.2" }, "last_serial": 3744191, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9f8eb42032865417fcb81ba47b7ce6da", "sha256": "0301239e813936b828a1bc2d117a3e32db056fd7f6e8438379e2f6098361a682" }, "downloads": -1, "filename": "narrative-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9f8eb42032865417fcb81ba47b7ce6da", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15270, "upload_time": "2018-04-07T19:08:00", "url": "https://files.pythonhosted.org/packages/62/d4/5b90cdcd2d2f7101ee6346687aafd3d5bf6411262cf2418c273fe90025e0/narrative-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d99cd5a8410a1210428cc17df403bb30", "sha256": "0dc5c83ddc570fd1b2d35de72dccd6aa831e429e3f8134f734080f8986e072a1" }, "downloads": -1, "filename": "narrative-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d99cd5a8410a1210428cc17df403bb30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16802, "upload_time": "2018-04-07T19:08:01", "url": "https://files.pythonhosted.org/packages/61/2c/c42bcbddd06aeeb6bfdcb0345ea6479d7bb2aabcc044fa4cbcf94a88c35e/narrative-0.1.0.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "017a1ac5327d45beb74f4ae8d6eb3707", "sha256": "2c1c00950687fe47988887958cab22337069b9df6a2bea7357a5dc67ad81ddb5" }, "downloads": -1, "filename": "narrative-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "017a1ac5327d45beb74f4ae8d6eb3707", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15267, "upload_time": "2018-04-07T19:44:27", "url": "https://files.pythonhosted.org/packages/f4/eb/0cf67b96bbd3243c5d094ff20c9125c1f08c8e3e179c934139f6cb4aa584/narrative-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a98fb2d1e1bc12486c87f4d6956d4e37", "sha256": "51afdf7326fc4cc5e6e418912c134377edc9dbd3c0176f0c9310dfa79fb6a67c" }, "downloads": -1, "filename": "narrative-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a98fb2d1e1bc12486c87f4d6956d4e37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16800, "upload_time": "2018-04-07T19:44:28", "url": "https://files.pythonhosted.org/packages/6c/34/3fb46d425dfffec36cb6cee2f27a887291d476c64f4e12bd10ba5b18300b/narrative-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "017a1ac5327d45beb74f4ae8d6eb3707", "sha256": "2c1c00950687fe47988887958cab22337069b9df6a2bea7357a5dc67ad81ddb5" }, "downloads": -1, "filename": "narrative-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "017a1ac5327d45beb74f4ae8d6eb3707", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15267, "upload_time": "2018-04-07T19:44:27", "url": "https://files.pythonhosted.org/packages/f4/eb/0cf67b96bbd3243c5d094ff20c9125c1f08c8e3e179c934139f6cb4aa584/narrative-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a98fb2d1e1bc12486c87f4d6956d4e37", "sha256": "51afdf7326fc4cc5e6e418912c134377edc9dbd3c0176f0c9310dfa79fb6a67c" }, "downloads": -1, "filename": "narrative-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a98fb2d1e1bc12486c87f4d6956d4e37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16800, "upload_time": "2018-04-07T19:44:28", "url": "https://files.pythonhosted.org/packages/6c/34/3fb46d425dfffec36cb6cee2f27a887291d476c64f4e12bd10ba5b18300b/narrative-0.1.2.tar.gz" } ] }