{ "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 :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Filters", "Topic :: Text Processing :: Markup :: HTML" ], "description": "# Document Object Identifiers and Python and Markdown, together!\n\nType journal article DOIs, and have them automagically converted into a beautiful bibliography.\n\n[](https://travis-ci.org/bcaller/markdown_doi)\n[](https://badge.fury.io/py/markdown_doi)\n\nA Markdown extension that looks through your text for things like `doi:10.1234/j.banana.5678`,\nlooks up the metadata on the crossref API and outputs text according to your requirements\n\nAdd `'markdown_doi'` to your Markdown call and watch the magic unfold:\n\n```python\n>>> from markdown import Markdown\n\n>>> markdown = Markdown(extensions=['markdown_doi']\n>>> markdown.convert('doi:10.1016/j.applanim.2010.02.004')\n```\noutputs\n```html\n
Are cows more likely to lie down the longer they stand? (2010)
\n```\n\nYou can enable the caching if for example you are using Pelican and constantly regenerating the same files\n\n```python\n>>> markdown = Markdown(extensions=['markdown_doi(cache_file=.doi_cache)']\n```\n\nThe templating function takes the metadata Dict from the\nmessage key of [the JSON API response](https://api.crossref.org/works/10.1016/j.applanim.2010.02.004)\nand returns a `markdown.util.etree.ElementTree`. See the default `template_title_link_year` function.\n\n```python\nfrom markdown_doi import makeExtension as makeDoiExtension\n\ndef templater(metadata, doi_pattern):\n el = markdown.util.etree.Element(\"span\")\n el.text = '%(given)s %(family)s' % metadata['author'][0]\n return el\n\next = makeDoiExtension(templater=templater)\nmd = markdown.Markdown(extensions=[ext])\nhtml = md.convert('hello 10.1016/j.applanim.2010.02.004')\nassert html == 'helloBert J. Tolkamp
'\n```\n\n## Options\n| Option | Type | Default |Description |\n|-----------|------|---------|------------|\n| templater | (Dict, LinkPattern) -> etree.ElementTree | None | Function which renders the metadata as an element tree |\n| cache_file | str | '' | File name that can store a cache of the DOIs looked up |\n| cache | dict | None | Instead, you can pass a map from DOI to metadata dict as the cache rather than a file name |\n\n\n## Installation\n>From Github:\n\n```\ngit clone https://github.com/bcaller/markdown_doi.git\npip install -e ./markdown_doi\n```\n\n>From Pypi:\n\n```\npip install markdown_doi\n```\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/bcaller/markdown_doi", "keywords": "doi research journals markdown", "license": "AGPLv3", "maintainer": "", "maintainer_email": "", "name": "markdown-doi", "package_url": "https://pypi.org/project/markdown-doi/", "platform": "", "project_url": "https://pypi.org/project/markdown-doi/", "project_urls": { "Homepage": "https://github.com/bcaller/markdown_doi" }, "release_url": "https://pypi.org/project/markdown-doi/1.1.0/", "requires_dist": [ "markdown (>=2.5)", "requests", "pypandoc; extra == 'develop'" ], "requires_python": "", "summary": "Convert doi:10.xxxxx/xxxx to nice bibliographic metadata", "version": "1.1.0" }, "last_serial": 4727829, "releases": { "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d0a53325943b997c48bc81a27d549009", "sha256": "5cf30b7163daeb696eb90ed9866bc1ed1fbd786c353dff53c1f90dfb8c7d5da7" }, "downloads": -1, "filename": "markdown_doi-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d0a53325943b997c48bc81a27d549009", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4765, "upload_time": "2017-02-09T22:49:34", "url": "https://files.pythonhosted.org/packages/8b/3a/599e0e8b06115d1f3d5a12be94cc91b409023a664aad83c232f8cd9e387a/markdown_doi-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4de7e0d6e0cdd5587838220cb73e2e3", "sha256": "8594f2b43d4f531fd5d05bfd3352707bdb0e450a1fb9f01aca92608f2b6c3a24" }, "downloads": -1, "filename": "markdown_doi-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f4de7e0d6e0cdd5587838220cb73e2e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15567, "upload_time": "2017-02-09T22:49:36", "url": "https://files.pythonhosted.org/packages/76/92/6a0f4556613058475f4a73999b929b7bc3cae4919a2c3318b3acecc4da3c/markdown_doi-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "9d7f13282b333bea9ca3aed4da86db1f", "sha256": "249e8f6ae2c5dbb56f2a081e3ff1feeca7c8e22b109c189bbd2328d9ab68072c" }, "downloads": -1, "filename": "markdown_doi-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9d7f13282b333bea9ca3aed4da86db1f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4764, "upload_time": "2017-02-09T23:00:14", "url": "https://files.pythonhosted.org/packages/b6/9f/693933dc6d57f4c4d8a457fabe7f1bcced8f3018118490f80428552fdc77/markdown_doi-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b05561b8a4e850d61686f4236fad1aea", "sha256": "63ecba8da91bf7b433f2338753520fb332d36de7a0c1ff0ed3095e97c260ca4e" }, "downloads": -1, "filename": "markdown_doi-1.0.2.tar.gz", "has_sig": false, "md5_digest": "b05561b8a4e850d61686f4236fad1aea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16979, "upload_time": "2017-02-09T23:00:16", "url": "https://files.pythonhosted.org/packages/9e/d6/4694ebf99b8abe50546ee062770c0175513c31c769e8600c206c9a006171/markdown_doi-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "94fd26637ed89dda65ff8c0cf65b5d41", "sha256": "82fa97cb11a522e63c9919c15452dfee084b5f0c58c520e4ef58430078ba3a97" }, "downloads": -1, "filename": "markdown_doi-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "94fd26637ed89dda65ff8c0cf65b5d41", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4764, "upload_time": "2017-02-09T23:18:06", "url": "https://files.pythonhosted.org/packages/f4/5e/d9271841b2106ab9dc5d004577ed13cf510fe1ebf1225c8b9aeef04e03ef/markdown_doi-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cd0038f44ecbae22f5b39b48c75a4729", "sha256": "c57c912bde328534359f808b1a48963cdbf4915eb97e90617cc6e065f94aca04" }, "downloads": -1, "filename": "markdown_doi-1.0.3.tar.gz", "has_sig": false, "md5_digest": "cd0038f44ecbae22f5b39b48c75a4729", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16979, "upload_time": "2017-02-09T23:18:08", "url": "https://files.pythonhosted.org/packages/d7/d7/92f513226a77430bee4d92efe0b2d949d694980850169a89356d7080bc07/markdown_doi-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "0432921ee93e767ea7be8edc6f564a27", "sha256": "0f28eaf851a3859ef4015d4bda0232d5ed8d81207ce6d2e56d1213b217d36eb2" }, "downloads": -1, "filename": "markdown_doi-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0432921ee93e767ea7be8edc6f564a27", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6750, "upload_time": "2017-02-09T23:26:41", "url": "https://files.pythonhosted.org/packages/fe/91/6d9b0f70dd787b57c197d308fbe9f8a11c2f53a1e1a34b8fec0ca4636891/markdown_doi-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b4b0bf7a867d2c509aeb2ba148789473", "sha256": "cb24b6ecc9e35d0241a7e600b72af7cc40aa37fc671df1183ea06c7499a0e299" }, "downloads": -1, "filename": "markdown_doi-1.0.4.tar.gz", "has_sig": false, "md5_digest": "b4b0bf7a867d2c509aeb2ba148789473", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16974, "upload_time": "2017-02-09T23:26:42", "url": "https://files.pythonhosted.org/packages/ac/b4/4d11fb2a24d143e5d40b0fd76966aa1efb77e85cbe27a41641f2c3a6a148/markdown_doi-1.0.4.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "414dfb41212af5c008d7945be0f3598e", "sha256": "ef4ecc3e37d70ddd58b6d6fda6af1b57c756c0462ad058d163b66cfeebce3a3c" }, "downloads": -1, "filename": "markdown_doi-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "414dfb41212af5c008d7945be0f3598e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6760, "upload_time": "2019-01-22T21:03:06", "url": "https://files.pythonhosted.org/packages/63/1c/490b7a79ecbfe6f9395abe4d74ac3f2722daba920e39cbc26afeac9d9267/markdown_doi-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccb87258167a6603f8c8ba80137cec26", "sha256": "061d6b0f06c24855cb848599f839ce526572653b83b7f6a887d7f2f098b87997" }, "downloads": -1, "filename": "markdown_doi-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ccb87258167a6603f8c8ba80137cec26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17008, "upload_time": "2019-01-22T21:03:08", "url": "https://files.pythonhosted.org/packages/c7/f3/cec6537320e8184c66a956542c82bcf33480648523b2e0a846734fb8c2b6/markdown_doi-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "414dfb41212af5c008d7945be0f3598e", "sha256": "ef4ecc3e37d70ddd58b6d6fda6af1b57c756c0462ad058d163b66cfeebce3a3c" }, "downloads": -1, "filename": "markdown_doi-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "414dfb41212af5c008d7945be0f3598e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6760, "upload_time": "2019-01-22T21:03:06", "url": "https://files.pythonhosted.org/packages/63/1c/490b7a79ecbfe6f9395abe4d74ac3f2722daba920e39cbc26afeac9d9267/markdown_doi-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccb87258167a6603f8c8ba80137cec26", "sha256": "061d6b0f06c24855cb848599f839ce526572653b83b7f6a887d7f2f098b87997" }, "downloads": -1, "filename": "markdown_doi-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ccb87258167a6603f8c8ba80137cec26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17008, "upload_time": "2019-01-22T21:03:08", "url": "https://files.pythonhosted.org/packages/c7/f3/cec6537320e8184c66a956542c82bcf33480648523b2e0a846734fb8c2b6/markdown_doi-1.1.0.tar.gz" } ] }