Package: citeproc-py
citeproc-py is aCSLprocessor for Python. It aims to implement theCSL 1.0.1 specification. citeproc-py can output styled citations and
bibliographies in a number of different output formats. Currently
supported are plain text, reStructuredText and HTML. Other formats can
be added easily.citeproc-py usessemantic versioning. Currently, its major version
number is still at 0, meaning the API is not yet stable. However, you
should not expect to see any major API changes soon.Requirementsciteproc-py supports Python 3.6 and up. It depends onlxmlfor parsing and
navigating the CSL style and locale files.InstallationThe recommended way of installing citeproc-py is by usingpip:pip install citeproc-pyIf lxml isn’t installed, pip will try to install it for you.If you insist, you can manually install citeproc-py from distribution packages
hosted atPyPI. Please ignore the release archives offered by GitHub.Getting StartedTo get started with citeproc-py, take a look at the examples underexamples/. Two examples are provided, one parsing references from a
JSON representation of references as supported by citeproc-js, another
parsing the references from a BibTeX file. Both show and explain how to
cite references and render the bibliography.CSL CompatibilityCurrently, citeproc-py passes almost 60% of the (relevant) tests in theciteproc-test suite. However, it is more than 60% complete, as
citeproc-py doesn’t take care of double spaces and repeated punctuation
marks yet, making a good deal of the tests fail. In addition, the
following features have not yet been implemented (there are probably
some I forgot though):disambiguation/year-suffixet-al-subsequent-min/et-al-subsequent-use-firstcollapsingpunctuation-in-quotedisplayAlso, someciteproc-jsfunctionality that is not part of the CSL spec
is not (yet) supported:raw datesstatic-orderingliteral namesRunning the TestsFirst clone theciteproc-test suiteso that it sits next to the
citeproc-py directory. Now you can runciteproc-test.py(in thetestsdirectory). Runciteproc-test.py--helpto see its usage information.ChangelogRelease 0.6.0 (2021-05-27)Bug fixesVarious issues on Windows: testing, explicit utf-8 encodingStrings with unescaped declared r”aw”Other changes:Removed support for Python 2.7, 3.5 and added for 3.9Travis CI is removed in favor of GitHub actions testing across
all 3 major OSes (MacOS, Windows, GNU/Linux Ubuntu)CSL test-suite progressed from 5779a8c to c3db429Release 0.5.1 (2020-03-06)Bug fixed:avoid rnc2rng 2.6.2 which breaks installation of citeproc-pyRelease 0.5.0 (2020-02-09)Enhancements:handle commas and ampersands in a functional styleNumber: handle commas and ampersandsadded symbol for textquotesinglespecify fallback locales for fr-CA and es-CLimproved page number and ranges parsingBug fixed:don’t fail on empty page ranges (#90) (bbm)detect end of file while parsing incorrect bib (#59) (John Vandenberg)Other changes:Removed 3.2-3.4 and added 3.7, 3.8 to supported PythonsRefactored locales handlingRelease 0.4.0 (2017-06-23)New features:allow specifying the encoding of a BibTeX database file (#20 and #25)BibTeX ‘month’ field: support integers and “<month> <day>” valuesBibTeX ‘pages’ field: support “10”, “10+”, “10-12” and “10–12” formatsBibTeX entry types: map the non-standard ‘thesis’ and ‘report’ entriesupdate the CSL schema to version 1.0.1 (#5)update the CSL locales to commit 49bf3fc0Bug fixed:avoid crash when there is nothing to affix (David Lesieur)fix BibTeX month to CSL month mapping (#24)strip leading/trailing whitespace from BibTeX values (#37)Release 0.3.0 (2014-11-07)Major improvements to the BibTeX parser:split names into parts and assign them to the equivalent CSL name partsfixed handling of accent macros and escaped charactersmore compatible (La)TeX macro handling in general (but still basic)handle standard Computer Modern ligatures such as –, —, and <<added unit tests for the BibTeX and LaTeX parsersOther changes:disable RelaxNG validation of CSL styles by default (API change)Release 0.2.0 (2014-10-25)bad cite callback function can determine how a bad cite is displayed (hetsch)added option to disable RelaxNG validation (Jasper Op de Coul)distutils was replaced with setuptools (Joshua Carp)bug fixes (Yaroslav Halchenko, David Lesieur)CitationStylesBibliography.bibliography() now returns the list of entries