pandoc-attrs
This is a simple parser / emitter for pandoc block attributes, intended for use with pandocfilters.
It can read and write attributes in any of these formats: - markdown - html - dictionary - pandoc
Installation:
pip install pandoc-attrs
Usage:
from pandocattrs import PandocAttributes
attrs = '#id .class1 .class2 key=value'
attributes = PandocAttributes(attrs, format='markdown')
attributes.to_markdown()
>>> '{#id .class1 .class2 key=value}'
attributes.to_dict()
>>> {'id': 'id', 'classes': ['class1', 'class2'], 'key'='value'}
attributes.to_html()
>>> id="id" class="class1 class2" key='value'
attributes.to_pandoc()
>>> ['id', ['class1', 'class2'], [['key', 'value']]]
attributes.id
>>> 'id'
attributes.classes
>>> ['class1', 'class2']
attributes.kvs
>>> OrderedDict([('key', 'value')])
Metadata
Release files for pandoc-attrs 0.1.7
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 | |
|---|---|---|---|---|
| pandoc-attrs-0.1.7.tar.gz | 3.9 kB | Without provenance | Details |
Release files / pandoc-attrs-0.1.7.tar.gz
| Download URL | pandoc-attrs-0.1.7.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b717e80f4739323c40993e248fd379f900ce3dfd4a596509df0b8a39aab11525
|
|
BLAKE2b-256 checksum How to use checksums |
f883120151a2f4286ca9ce7f76655a959cfcbf5c4ab26b8b459d1a1f81f92f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
|
Security for pandoc-attrs 0.1.7
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.