{ "info": { "author": "Marcus M. Scheunemann", "author_email": "find@mms.ai", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing" ], "description": "# Pelican Bib\n\nOrganize your scientific publications with BibTeX in Pelican. The package is based on Vlad's [pelican-bibtex](https://github.com/vene/pelican-bibtex). The current version is backward compatible and can replace the `pelican-bibtex` install of your current project.\n\n## Installation\n\n`pelican_bib` requires `pybtex`.\n\n pip install pybtex\n\n## Using pip\n\n pip install pelican-bib\n\nAdd the plugin to the `PLUGINS` variable:\n\n PLUGINS = ['pelican_bib', ...]\n\n### As a Submodule\n\nIn your Pelican site:\n\n $ mkdir plugins\n $ git submodule add https://github.com/scheunemann/pelican-bib plugins/pelican-bib\n\nAnd Pelican config:\n\n PLUGIN_PATHS = ['plugins/pelican_bib', ...]\n PLUGINS = ['pelican_bib', ...]\n\n## How to Use\n\nThis plugin reads a user-specified BibTeX file and populates the context with\na list of publications, ready to be used in your Jinja2 template.\n\nConfiguration is simply:\n\n PUBLICATIONS_SRC = 'content/pubs.bib'\n\n\nIf the file is present and readable, you will be able to find the `publications`\nvariable in all templates. It is a list of dictionaries with the following keys:\n\n1. `key` is the BibTeX key (identifier) of the entry.\n2. `year` is the year when the entry was published. Useful for grouping by year in templates using Jinja's `groupby`\n3. `text` is the HTML formatted entry, generated by `pybtex`.\n4. `bibtex` is a string containing BibTeX code for the entry, useful to make it\navailable to people who want to cite your work.\n5. `pdf`, `slides`, `poster`: in your BibTeX file, you can add these special fields,\nfor example:\n\n ```\n @article{\n foo13\n ...\n pdf = {/papers/foo13.pdf},\n slides = {/slides/foo13.html}\n }\n ```\n\n\nThis plugin will take all defined fields and make them available in the template.\nIf a field is not defined, the tuple field will be `None`. Furthermore, the\nfields are stripped from the generated BibTeX (found in the `bibtex` field).\n\n### Split into lists of publications\n\nYou can add an extra field to each bibtex entry. This value of that field is a comma seperated list.\nThese values will become the keys of a list `publications_lists` containing the associated bibtex entries in your template.\n\nFor example, if you want to associate an entry with two different tags (`foo-tag`, `bar-tag`), \nyou add the following field to the bib entry:\n\n\n @article{\n foo13\n ...\n tags = {foo-tag, bar-tag}\n }\n\n\nIn your `pelicanconf.py` you'll need to set:\n\n PUBLICATIONS_SPLIT_BY = 'tags'\n\n\nIn your template you can then access these lists with the variables `publications_lists['foo-tag']` and `publications_lists['bar-tag']`.\n\nIf you want to assign all untagged entries (i.e. entries without \nthe field defined in `PUBLICATIONS_SPLIT_BY`) to a tag named `others`, set: \n\n PUBLICATIONS_UNTAGGED_TITLE = 'others'\n\n\n## Page with a list of publications\n\nTo generate a page displaying the publications with one of the methods below, you need to add a template file and a page.\n\n1.) place the template file as `publications.html` in `content/templates` and add it as direct template to your webpage. Add in your `pelicanconf.py`:\n\n\n THEME_TEMPLATES_OVERRIDES.append('templates')\n\n\n2.) Create a page in your page folder, e.g., 'content/pages/publications.rst' with the following metadata in your content:\n\n\n Publications\n ############\n\n :template: publications\n\n\n\n## Example templates\n\nExample content of the `publications.html` template:\n\n {% extends \"base.html\" %}\n {% block title %}Publications{% endblock %}\n {% block content %}\n\n \n
\n

Publications

\n \n
\n {% endblock %}\n\n_(Note: that we are escaping the BibTeX string twice in order to properly display it. \nThis can be achieved using `forceescape`)_\n\n### Sorting entries\n\nThe entries can be sorted by one of the attributes, for example, if you want to sort the entries by date, your unordered list would look like the following:\n\n\n ...\n \n ...\n\n\nThe [sort builtin filter](http://jinja.pocoo.org/docs/2.10/templates/#sort) was added in version 2.6 of jinja2. \n\n### Grouping entries\n\nTo group entries by year,\n\n\n ...\n \n ...\n\n\n### Using lists of publications\n\nAs described above, lists of publications are stored in `publications_lists`.\nYou can replace `publications` from the previous example with `publications_lists['foo-tag']` to only show the publications with tagged with `foo-tag`. \n\nYou can also iterate over the map and present all bib entries of each list.\nThe section of the previous example changes to:\n\n ...\n
\n

Publications

\n {% for tag in publications_lists %}\n {% if publications_lists|length > 1 %}\n

{{tag}}

\n {% endif %}\n \t \n \t {% endfor %}\n
\n ...\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/scheunemann/pelican-bib/archive/0.2.7.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scheunemann/pelican-bib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pelican-bib", "package_url": "https://pypi.org/project/pelican-bib/", "platform": "", "project_url": "https://pypi.org/project/pelican-bib/", "project_urls": { "Download": "https://github.com/scheunemann/pelican-bib/archive/0.2.7.zip", "Homepage": "https://github.com/scheunemann/pelican-bib" }, "release_url": "https://pypi.org/project/pelican-bib/0.2.7/", "requires_dist": null, "requires_python": "", "summary": "Organize your scientific publications using Pelican and BibTeX", "version": "0.2.7" }, "last_serial": 4608967, "releases": { "0.2.7": [ { "comment_text": "", "digests": { "md5": "2009be2e784bdf9c9fb51ecca7968385", "sha256": "cdcca3678a6b1fcdbebfb457ee10e6716e546408b3db22204ae5c5cf19348bd1" }, "downloads": -1, "filename": "pelican_bib-0.2.7-py3-none-any.whl", "has_sig": false, "md5_digest": "2009be2e784bdf9c9fb51ecca7968385", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6576, "upload_time": "2018-12-17T17:41:43", "url": "https://files.pythonhosted.org/packages/be/2d/2dc45d316f0353f16f3074171cbf900bfec1371d0ee2c6690864a70e966b/pelican_bib-0.2.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "984e282347156d708aa8f1698b749f13", "sha256": "06c81ca743fa0a3f3672d9a394715c787589ce28a5538b784aa14e1f2e617004" }, "downloads": -1, "filename": "pelican-bib-0.2.7.tar.gz", "has_sig": false, "md5_digest": "984e282347156d708aa8f1698b749f13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5886, "upload_time": "2018-12-17T17:41:44", "url": "https://files.pythonhosted.org/packages/bf/45/7d8ff9cd9196c305685582da889d1660da3a7a54b2d6e74a36b4fd92794a/pelican-bib-0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2009be2e784bdf9c9fb51ecca7968385", "sha256": "cdcca3678a6b1fcdbebfb457ee10e6716e546408b3db22204ae5c5cf19348bd1" }, "downloads": -1, "filename": "pelican_bib-0.2.7-py3-none-any.whl", "has_sig": false, "md5_digest": "2009be2e784bdf9c9fb51ecca7968385", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6576, "upload_time": "2018-12-17T17:41:43", "url": "https://files.pythonhosted.org/packages/be/2d/2dc45d316f0353f16f3074171cbf900bfec1371d0ee2c6690864a70e966b/pelican_bib-0.2.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "984e282347156d708aa8f1698b749f13", "sha256": "06c81ca743fa0a3f3672d9a394715c787589ce28a5538b784aa14e1f2e617004" }, "downloads": -1, "filename": "pelican-bib-0.2.7.tar.gz", "has_sig": false, "md5_digest": "984e282347156d708aa8f1698b749f13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5886, "upload_time": "2018-12-17T17:41:44", "url": "https://files.pythonhosted.org/packages/bf/45/7d8ff9cd9196c305685582da889d1660da3a7a54b2d6e74a36b4fd92794a/pelican-bib-0.2.7.tar.gz" } ] }