Citeproc extension for Python markdown
Project description
citeproc-markdown
Python markdown extension to convert a CSL YAML 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.
```bibl
- 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'
```
Python conversion snippet
from markdown import markdown
markdown(
content, extensions=['citeproc'],
extension_configs={
'citeproc': {
'citeproc_endpoint': 'DEFINE_ENDPOINT_HERE'
}
}
)
HTML output
<h1>The origins of the term 'Anthropocene'</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>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
citeproc-markdown-0.1.tar.gz
(3.3 kB
view details)
Built Distribution
File details
Details for the file citeproc-markdown-0.1.tar.gz
.
File metadata
- Download URL: citeproc-markdown-0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af29ab06574efc592f7216f8cec4064881a299f03188f7b5873aef9ab55751d |
|
MD5 | 214e83fe9db8e58bd72aa82c66509b46 |
|
BLAKE2b-256 | f9f23e075f2965880d428d8dca0ece1b53d353123ce62d3eeca879a1d011d7b3 |
File details
Details for the file citeproc_markdown-0.1-py3-none-any.whl
.
File metadata
- Download URL: citeproc_markdown-0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57022cde9dd1334f0ddb6f9beb4aae54389ee4b76354e9d0c4fcb5f3d53fc688 |
|
MD5 | 4b24817c2cd1cadcd7452bb26f37e12c |
|
BLAKE2b-256 | e14218e788fdcf94c9487a4c0d8c24caa9ae41c1d332c870f74cd49f3d6f17ee |