citeproc-markdown
Python markdown extension to convert a CSL data block in markdown to a styled bibliography in the HTML output. Requires a citeproc-js server in order to work.
Example
Markdown source
# The origins of the term _anthropocene_
The term _anthropocene_ has been coined by Crutzen and Stoermer in the year 2000.
```csl-yaml
- id: crutzenAnthropocene2000
author:
- family: Crutzen
given: P.J.
- family: Stoermer
given: E.F.
container-title: Global Change Newsletter
issued:
raw: "2000"
page: 17-18
title: The “Anthropocene”
type: article-journal
volume: '41'
```
We use a fenced code block to store the CSL data. The data language is defined directly after the first backticks as csl-<language>, where <language> is the language the bibliographic data is stored in. Supported values are yaml, json and json5.
Python conversion snippet
from markdown import markdown
markdown(
content, extensions=['citeproc'],
extension_configs={
'citeproc': {
'citeproc_endpoint': 'DEFINE_ENDPOINT_HERE'
}
}
)
Alternatively, the endpoint can also be defined through the environment variable CITEPROC_ENDPOINT, either in memory or in a .env or settings.ini file in the working directory.
HTML output
<h1>The origins of the term <em>anthropocene</em></h1>
<p>The term <em>anthropocene</em> has been coined by Crutzen and Stoermer in the year 2000.</p>
<div class="csl-bib-body">
<div class="csl-entry">Crutzen, P.J., and E.F. Stoermer. 2000. “The ‘Anthropocene.’” <i>Global Change Newsletter</i> 41: 17–18.</div>
</div>
Metadata
Release files for citeproc-markdown 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| citeproc-markdown-0.2.tar.gz | 4.8 kB | Without provenance | Details |
Release files / citeproc-markdown-0.2.tar.gz
| Download URL | citeproc-markdown-0.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24833201f3e7de7148c6bb4368a5c12e9237278b18295f12d6f3fba19a71f069
|
|
BLAKE2b-256 checksum How to use checksums |
c22dad19c0ed3b36000bb5b57d92f7c3d43df6caa3eb58d239661706fddc7030
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.2
|
Security for citeproc-markdown 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.