Skip to content

pelican-bibtex: Manage your academic publications page with Pelican and BibTeX

License

Notifications You must be signed in to change notification settings

cycomanic/pelican-perpagepublications

 
 

Repository files navigation

Pelican PerPagePublications

Create scientific publications list for different publication type BibTeX databases given in the page or post metadata. This plugin is an extension of the Pelican BibTex plugni by Vlad Vene.

Requirements

pelican_bibtex requires pybtex.

pip install pybtex

How to Use

This plugin reads per publication type user-specified BibTeXs files given in the metadata of a page or post and populates the context with several lists of publications as well as publication counts, ready to be used in your Jinja2 template.

Configuration is specify any combination of the following in your page or post metadata:

journal_src = 'contents/journals.bib'
conference_src = 'contents/conferences.bib'
patent_src = 'contents/patents.bib'
book_chapter_src = 'contents/book_chapters.bib'
book_src = 'contents/books.bib'

For each of the files that are present and readable, you will find to variables in the context:

  1. A variable named after the bibtype given by the variable of the src without _src, e.g. journal. This is a list of tuples containing the following information;
(key, year, text, bibtex, url/pdf, slides, poster)

i. key is the BibTeX key (identifier) of the entry. ii. year is the year when the entry was published. Useful for grouping by year in templates using Jinja's groupby iii. text is the HTML formatted entry, generated by pybtex. iv. bibtex is a string containing BibTeX code for the entry, useful to make it available to people who want to cite your work. vi. url/pdf, slides, poster: in your BibTeX file, you can add these special fields, for example:

@article{
   foo13
   ...
   pdf = {/papers/foo13.pdf},
   slides = {/slides/foo13.html}
}

Important: If the bibtex entry contains a url field this takes precedence over the pdf field. This plugin will take all defined fields and make them available in the template. If a field is not defined, the tuple field will be None. Furthermore, the fields are stripped from the generated BibTeX (found in the bibtex field).

  1. A variable named after bibtype + Nos (e.g. journalNos) giving the number of publications of that type.

In addition to the journal, conference, patent, book_chapter and book type publication list which are generated from the specified src databases, there are also two special lists which are generated from the conference list: invited and postdeadline, these contain the conference entries that have either an invited or postdeadline keyword in the bibtex file, for example:

@inproceedings{
    bar11
    ...
    keywords = {foo, invited,},
}

The entries with these keywords will be removed from the conference list.

Template Example

You probably want to define a 'publications.html' direct template. Don't forget to add it to the DIRECT\_TEMPLATES configuration key. Note that we are escaping the BibTeX string twice in order to properly display it. This can be achieved using forceescape.

See the publications.html template file for an example.

Acknowledgement

This plugin is a minor extension of the pelican-bibtex plugin by Vlad Vene. Most of the work was done by him, I just made some small adjustments.

About

pelican-bibtex: Manage your academic publications page with Pelican and BibTeX

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.8%
  • HTML 39.2%