{ "info": { "author": "Horst Gutmann", "author_email": "zerok@zerokspot.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "#########\nzs.bibtex\n#########\n\n.. image:: https://travis-ci.org/zerok/zs.bibtex.svg?branch=master\n :target: https://travis-ci.org/zerok/zs.bibtex\n\nThis package for now only includes a quite basic parser for BibTeX which\nconverts a bibliography and its entries into simple dict-like data structures\nand also checks crossreferences if used.\n\n.. warning::\n\n The parser does not (and probably never will) support some of the more\n advanced BibTeX-features like preambles.\n\n It also doesn't convert things like accented characters into unicode but\n leaves them as they were in the original input.\n\n\nUsage\n=====\n\nA simple example on how to use it::\n\n from zs.bibtex.parser import parse_string\n\n data = '''@article{mm09,\n author = {Max Mustermann},\n title = {The story of my life},\n year = {2009},\n journal = {Life Journale}\n }'''\n\n bibliography = parse_string(data)\n article = bibliography['mm09']\n\nA bibliography as well as each entry in it offers a ``validate()`` method\nwhich checks aspects like cross-references on the bibliography and fields on\nthe entries. It also supports an optional ``raise_unsupported``\nkeyword-argument which raises an exception once a possibly unsupported field\nis used in an entry.\n\nThe information about what fields are required and optional for what kind of\nentry is based on the `BibTeX article`_ on Wikipedia.\n\nIf you're working with a file you can also use a small helper function called\n``parse_file(file_or_path, encoding='utf-8', validate=False)`` which works on a\ngiven filepath or file-like object and returns a bibliography object for the\ncontent of that file.\n\n\nCustom entry types\n==================\n\nOut of the box zs.bibtex supports following entry types for validation:\n\n- article\n- book\n- booklet\n- incollection\n- inproceedings\n- conference\n- inbook\n- manual\n- masterthesis\n- misc\n- phdthesis\n- proceedings\n- techreport\n- unpublished\n\nFor details on which of these requires what fields please take a look at the\n``zs.bibtex.structures`` module.\n\nBut if you are in a situation where you need a different entry type, you can\nalso easily register your own.\n\nFirst you have to create a subclass of the ``zs.bibtex.structures.Entry``\nclass::\n\n from zs.bibtex import structures\n\n\n class MyEntryType(structures.Entry):\n required_fields = ('required_field_1', ('either_this', 'or_that', ), )\n optional_fields = ('optional_field_1', )\n\n\nand then simply register it::\n\n structures.TypeRegistry.register('mytype', MyEntryType')\n\n\n.. _BibTeX article: http://en.wikipedia.org/wiki/Bibtex", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zerok/zs.bibtex/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "zs.bibtex", "package_url": "https://pypi.org/project/zs.bibtex/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zs.bibtex/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/zerok/zs.bibtex/" }, "release_url": "https://pypi.org/project/zs.bibtex/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A small collection of bibtex utilities (incl. a minimal parser)", "version": "1.0.0" }, "last_serial": 1710116, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "527c99050d368c8035bce53b62cf6c04", "sha256": "7c3cacbb603a530da5204de93584eda3fb8238adeb41ab4fe1b3da871d4e3d6d" }, "downloads": -1, "filename": "zs.bibtex-0.1.0.tar.gz", "has_sig": false, "md5_digest": "527c99050d368c8035bce53b62cf6c04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13923, "upload_time": "2009-05-21T01:57:11", "url": "https://files.pythonhosted.org/packages/d2/f9/5e8b73337b08cc732092b5d9329764fa723c1f6fa0616daea8279fa8bccf/zs.bibtex-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "fa87c9c55a1442f4669d8c398a7d8d3c", "sha256": "f124fde9707905a0c7564beb8078ac876a3284c1b4f3ffa3cdb44f40c86aa604" }, "downloads": -1, "filename": "zs.bibtex-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fa87c9c55a1442f4669d8c398a7d8d3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8953, "upload_time": "2015-09-06T08:44:45", "url": "https://files.pythonhosted.org/packages/3b/b7/331d306da6b489e295ef975083b025c877dd890b4f4db38e8af3adbc7c96/zs.bibtex-1.0.0.tar.gz" } ], "1.0.0rc1": [ { "comment_text": "", "digests": { "md5": "5d1f5bdb7ac83db1f7e43ec615b2fa99", "sha256": "cdb5fab1850ad977d4c3cade279dcafac0d9818c7d97d88ee0ef08aebff0966a" }, "downloads": -1, "filename": "zs.bibtex-1.0.0rc1.tar.gz", "has_sig": false, "md5_digest": "5d1f5bdb7ac83db1f7e43ec615b2fa99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7954, "upload_time": "2015-09-04T17:55:58", "url": "https://files.pythonhosted.org/packages/7d/bb/1ab6434a7cf6e2dfe6ec6bf86659e44431d54221eef87b365a5f0d603001/zs.bibtex-1.0.0rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fa87c9c55a1442f4669d8c398a7d8d3c", "sha256": "f124fde9707905a0c7564beb8078ac876a3284c1b4f3ffa3cdb44f40c86aa604" }, "downloads": -1, "filename": "zs.bibtex-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fa87c9c55a1442f4669d8c398a7d8d3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8953, "upload_time": "2015-09-06T08:44:45", "url": "https://files.pythonhosted.org/packages/3b/b7/331d306da6b489e295ef975083b025c877dd890b4f4db38e8af3adbc7c96/zs.bibtex-1.0.0.tar.gz" } ] }