Skip to main content

UNKNOWN

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.1.0.zip (158.6 kB view details)

Uploaded Source

Built Distribution

citeproc-py-0.1.0.win32.exe (352.8 kB view details)

Uploaded Source

File details

Details for the file citeproc-py-0.1.0.zip.

File metadata

  • Download URL: citeproc-py-0.1.0.zip
  • Upload date:
  • Size: 158.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for citeproc-py-0.1.0.zip
Algorithm Hash digest
SHA256 aee987cfbcbe6d8e9f4055314d80549ac6b353b4fbc9a8a7f88100fc8fa2157a
MD5 cdb3b32b1d8f1625eb9b25f3406dc989
BLAKE2b-256 1cb50d0852d044ca5a415a47565bb1e145dbc42e7401b788546f23dbb18cd3f5

See more details on using hashes here.

Provenance

File details

Details for the file citeproc-py-0.1.0.win32.exe.

File metadata

File hashes

Hashes for citeproc-py-0.1.0.win32.exe
Algorithm Hash digest
SHA256 e3f500fa8d04cf05b500bf3fbc536e73e45bd3fe4a8d177122ce3e5a287b712b
MD5 b8edfd642e49e45538cf68707957759c
BLAKE2b-256 a7d39c404c2371a27e389438fd2bd7b1287b0161f370f7bd67d57665d576e1cd

See more details on using hashes here.

Provenance

Supported by

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