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.2.0.tar.gz (89.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

citeproc_py-0.2.0-py3.4.egg (202.2 kB view details)

Uploaded Egg

citeproc_py-0.2.0-py3-none-any.whl (159.4 kB view details)

Uploaded Python 3

citeproc_py-0.2.0-py2.7.egg (199.4 kB view details)

Uploaded Egg

citeproc_py-0.2.0-py2-none-any.whl (159.4 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for citeproc-py-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e0b6c84be6be6a9e9be65e973ec8db3dea401329a5bad29bf87bb6f0443c140
MD5 e9709b97b549c341ee5ab161f71adcb3
BLAKE2b-256 7d02307fedd505d35ea3cde9c7606cc81344372377e8526b200aa12ee0d7564c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for citeproc_py-0.2.0-py3.4.egg
Algorithm Hash digest
SHA256 872c9ead80dd9e0ea20fae58317d0f567e935fcf20f4525fcd633ae112a34486
MD5 6fa6e3ed6616eb77febdeb7ff9c4580b
BLAKE2b-256 b388a6fa0655d518938761912e54c87a27ea8a946c45fa6709190e22cb7ede06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for citeproc_py-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51ecb6d060e84578645b00fefed358385d3a350c72995451a114b5c355c7ca98
MD5 c623f1823af2b0831dbd3ff62e0b8456
BLAKE2b-256 5d2d4d546285fec631e3018ca88aa12daa9b04e65d1b2267265addf713769610

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for citeproc_py-0.2.0-py2.7.egg
Algorithm Hash digest
SHA256 1bc46701352ed0435c5f5ae03aa73c7f283f874080f2aceba018b8ce408338d9
MD5 7cee46375084fb0a709057043eff5361
BLAKE2b-256 2362a0c5300a109cc2f2f649e82367c1a83d1fc7e2ae9baa058c76c5930e2b60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for citeproc_py-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 26a17fce814d6828ba4b696c63dc0171ecdba984f9f0fe3892368a1c75ba11dc
MD5 c684f0cf92bb787eba8158d62c26fdcf
BLAKE2b-256 abf48b6229a42c8307b092bf0a41f79417097862711d81a9e6104462d0709fd8

See more details on using hashes here.

Supported by

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