{ "info": { "author": "Ben Caller", "author_email": "bcallergmai@l.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML" ], "description": "# Pinyin and Python and Markdown, together!\n\nType Chinese pinyin with tone numbers, and have them automagically converted to beautiful accented pinyin.\n\n[](https://travis-ci.org/bcaller/pinyin_markdown)\n[](https://badge.fury.io/py/pinyin_markdown)\n\nA Markdown extension that looks through your text for things like `yi1dian3r`, `Xi3an4` and `lu:5` and replaces\nthem with accented pinyin. The pinyin syllables are marked up with span tags with classes denoting\nthe tone.\n\nAdd `'pinyin_markdown'` to your Markdown call and watch the magic unfold:\n\n```python\n>>> from markdown import Markdown\n\n>>> markdown = Markdown(extensions=['pinyin_markdown']\n>>> markdown.convert('i \u2665 Xi3an4!')\n
i \u2665 X\u01d0'\u00e0n
\n\n>>> markdown = Markdown(extensions=['pinyin_markdown(tone_class=, apostrophe_class=apo)']\n>>> markdown.convert('i \u2665 Xi3an4!')\ni \u2665 X\u01d0'\u00e0n
\n```\n\nThe three examples above are rendered as: y\u012bdi\u01cenr, X\u01d0'\u00e0n and l\u00fc, with HTML:\n\n```html\ny\u012bdi\u01cenr\nX\u01d0'\u00e0n\nl\u00fc\n```\n\n## Options\n| Option | Type | Default |Description |\n|-----------|------|---------|------------|\n| tone_class | str | 'tone{}' | HTML class name for tones, which will be formatted with tone_class.format(tone) where tone is a number 1-5|\n| apostrophe_class | str | 'pyap' | HTML class name for apostrophes needed between vowels |\n| erhua_class | str | 'erhua' | HTML class name for the erhua 'r' e.g. in dianr |\n| entities | bool | False | If True, output the accented characters as entity codes `&466#;` |\n\n\n## Installation\n>From Github:\n\n```\ngit clone https://github.com/bcaller/pinyin_markdown.git\npip install -e ./pinyin_markdown\n```\n\n>From Pypi:\n\n```\npip install pinyin_markdown\n```\n\nAlso have a look at [tsroten's zhon](https://github.com/tsroten/zhon) for more Python pinyin goodness.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bcaller/pinyin_markdown", "keywords": "pinyin chinese markdown", "license": "AGPLv3", "maintainer": "", "maintainer_email": "", "name": "pinyin_markdown", "package_url": "https://pypi.org/project/pinyin_markdown/", "platform": "", "project_url": "https://pypi.org/project/pinyin_markdown/", "project_urls": { "Homepage": "https://github.com/bcaller/pinyin_markdown" }, "release_url": "https://pypi.org/project/pinyin_markdown/0.8.2/", "requires_dist": [ "markdown (>=2.5)" ], "requires_python": "", "summary": "Type Chinese pinyin with tone numbers in Markdown. Get accented pinyin.", "version": "0.8.2" }, "last_serial": 2632074, "releases": { "0.8": [], "0.8.1": [ { "comment_text": "", "digests": { "md5": "cf1a37bf5720333a1f45d7063769a5e1", "sha256": "3bacd538fc5a23d06981e3260e64a74dd0ee68338947ccfec9b77caf6622bb32" }, "downloads": -1, "filename": "pinyin_markdown-0.8.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cf1a37bf5720333a1f45d7063769a5e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4283, "upload_time": "2017-02-09T22:21:52", "url": "https://files.pythonhosted.org/packages/10/77/19cb481b5e553e52d458ef980c294db619ddc9b51ca7eff741dc1ab882f1/pinyin_markdown-0.8.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd462e5877487f9b486c6f9b6fe994d0", "sha256": "ab483b01dd2b8d8f8d5be051786d3d8c55e439823be35e6680b93ef4b8293e87" }, "downloads": -1, "filename": "pinyin_markdown-0.8.1.tar.gz", "has_sig": false, "md5_digest": "cd462e5877487f9b486c6f9b6fe994d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30064, "upload_time": "2017-02-09T22:21:54", "url": "https://files.pythonhosted.org/packages/03/c1/6ed5d7fc7c7e6469063a873a832ceff5ed68f37c40cfe8f667c315fa3b51/pinyin_markdown-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "55203d6ed57215e72d1cb3f284d32287", "sha256": "0dc5f04a185fda984e3db8008c993360a7eed86af7de06c4a22c5bdf2663a283" }, "downloads": -1, "filename": "pinyin_markdown-0.8.2-py3-none-any.whl", "has_sig": false, "md5_digest": "55203d6ed57215e72d1cb3f284d32287", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9084, "upload_time": "2017-02-09T23:30:19", "url": "https://files.pythonhosted.org/packages/05/d0/b455ec8a16e11bc97056adbff8e7656c1782d49292824a8c31d7152a9714/pinyin_markdown-0.8.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a12b68875f461a050aaeada70d0f9007", "sha256": "0d07a9ccdfcf9b359d9dd1470c2f0e8c9b429a2a0fc4f663c1edbcc06aa97a9b" }, "downloads": -1, "filename": "pinyin_markdown-0.8.2.tar.gz", "has_sig": false, "md5_digest": "a12b68875f461a050aaeada70d0f9007", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30072, "upload_time": "2017-02-09T23:30:21", "url": "https://files.pythonhosted.org/packages/0e/2e/cd8110d3cb14f7d04bd1600d321960884de20a703dd4d5b55e966617008e/pinyin_markdown-0.8.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "55203d6ed57215e72d1cb3f284d32287", "sha256": "0dc5f04a185fda984e3db8008c993360a7eed86af7de06c4a22c5bdf2663a283" }, "downloads": -1, "filename": "pinyin_markdown-0.8.2-py3-none-any.whl", "has_sig": false, "md5_digest": "55203d6ed57215e72d1cb3f284d32287", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9084, "upload_time": "2017-02-09T23:30:19", "url": "https://files.pythonhosted.org/packages/05/d0/b455ec8a16e11bc97056adbff8e7656c1782d49292824a8c31d7152a9714/pinyin_markdown-0.8.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a12b68875f461a050aaeada70d0f9007", "sha256": "0d07a9ccdfcf9b359d9dd1470c2f0e8c9b429a2a0fc4f663c1edbcc06aa97a9b" }, "downloads": -1, "filename": "pinyin_markdown-0.8.2.tar.gz", "has_sig": false, "md5_digest": "a12b68875f461a050aaeada70d0f9007", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30072, "upload_time": "2017-02-09T23:30:21", "url": "https://files.pythonhosted.org/packages/0e/2e/cd8110d3cb14f7d04bd1600d321960884de20a703dd4d5b55e966617008e/pinyin_markdown-0.8.2.tar.gz" } ] }