Skip to main content

Citations and bibliography formatter

Project description

citeproc-py is a CSL processor for Python. It aims to implement the CSL 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 uses semantic 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.

Requirements

citeproc-py has been developed for Python 3 but also runs on Python 2.6+. It depends on lxml for parsing and navigating the CSL style and locale files.

Getting Started

To get started with citeproc-py, take a look at the examples under examples/. 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 Compatibility

Currently, citeproc-py passes almost 60% of the (relevant) tests in the citeproc-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-suffix

  • et-al-subsequent-min/et-al-subsequent-use-first

  • collapsing

  • punctuation-in-quote

  • display

Also, some citeproc-js functionality that is not part of the CSL spec is not (yet) supported:

  • raw dates

  • static-ordering

  • literal names

Running the Tests

First clone the citeproc-test suite so that it sits next to the citeproc-py directory. Then run the processor.py script to generate the test fixtures (using Python 2.x). After that, you can run citeproc-test.py (in the tests directory). Run citeproc-test.py --help to see its usage information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citeproc-py-0.3.0.tar.gz (91.5 kB view details)

Uploaded Source

Built Distributions

citeproc_py-0.3.0-py3.4.egg (211.0 kB view details)

Uploaded Egg

citeproc_py-0.3.0-py3-none-any.whl (162.4 kB view details)

Uploaded Python 3

citeproc_py-0.3.0-py2.7.egg (208.0 kB view details)

Uploaded Egg

citeproc_py-0.3.0-py2-none-any.whl (162.4 kB view details)

Uploaded Python 2

File details

Details for the file citeproc-py-0.3.0.tar.gz.

File metadata

  • Download URL: citeproc-py-0.3.0.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for citeproc-py-0.3.0.tar.gz
Algorithm Hash digest
SHA256 dbd484c66e985330d51f782c4ef0f17489da641661f80d8caf6f9ff779ff6ac1
MD5 e23da3b6c75485f82e1e5a725235731e
BLAKE2b-256 1af5761e30e9470525b197594a7e9008a9f456223d7d34bfeea08772f909eeed

See more details on using hashes here.

File details

Details for the file citeproc_py-0.3.0-py3.4.egg.

File metadata

File hashes

Hashes for citeproc_py-0.3.0-py3.4.egg
Algorithm Hash digest
SHA256 acbef90d16731320af5b2abf88fb31cc0bee30c29110f113639843fe8f1b8447
MD5 92701a03310035d40c6d709ab1657850
BLAKE2b-256 9e61c5a0e3551d938cf07112914d5f91f71749b9f2c1a85741e6e7202bf182ee

See more details on using hashes here.

File details

Details for the file citeproc_py-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citeproc_py-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08444fd263f84af4fb3a50ea74a2ce50a119f5e5186f022271c83d0615f107b7
MD5 08f277ab0af7d38af8c45342379ac692
BLAKE2b-256 061df55e49699ab6e88d371d61bbf900e6f6406e2fb0bb2ca147a487c3dc6ba6

See more details on using hashes here.

File details

Details for the file citeproc_py-0.3.0-py2.7.egg.

File metadata

File hashes

Hashes for citeproc_py-0.3.0-py2.7.egg
Algorithm Hash digest
SHA256 bf6db2a57ad71e2aa1b71e2326672789158d8fcc24a67426b2af88d857066d86
MD5 f32f775333a120a3a96c019a06696471
BLAKE2b-256 2a73755147c73f1e0831564015acd8738eef49e5b36bfc36cf50f259cf9ce846

See more details on using hashes here.

File details

Details for the file citeproc_py-0.3.0-py2-none-any.whl.

File metadata

File hashes

Hashes for citeproc_py-0.3.0-py2-none-any.whl
Algorithm Hash digest
SHA256 07dddd9ca6730e84c3795893d8692ecb4456b7319818497c6410d5d68ed9dbb7
MD5 acfeaa820b9517b78df6608d79e30882
BLAKE2b-256 47ef770a11c1226189f219727ab6bc88c170eeeb5ddb3cba1566668c670c39af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page