A markdown extension for converting Leiden+ epigraphic text to TEI XML/HTML
Project description
LeidenMark
$ pip install leidenmark
A Python Markdown extension for converting Leiden+ epigraphic text to TEI XML/HTML. Inspired by the Brill plain text (BPT) format that aims to incorporate Leiden+ into a Markdown-based syntax.
>>> from markdown import markdown
>>> from leidenmark import LeidenPlus
>>> content = """\
<D=.r<=
1. Lorem ipsum dolor
2. sit amet, con[ca.3]c
3.-etur adipiscing
=>=D>
<D=.v<=
lost.2lin
6. ut labore et dol
7.-ore magna aliqua
=>=D>"""
>>> markdown(content, extensions = [LeidenPlus()])
The output of the above lines is the following XML snippet (manually indented):
<div n="r" type="textpart">
<ab>
<l n="1">Lorem ipsum dolor</l>
<l n="2">sit amet, con<gap precision="low" quantity="3" unit="character"></gap>c</l>
<l break="no" n="3">etur adipiscing</l>
</ab>
</div>
<div n="v" type="textpart">
<ab>
<gap quantity="2" unit="line"></gap>
<l n="6">ut labore et dol</l>
<l break="no" n="7">ore magna aliqua</l>
</ab>
</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
leidenmark-0.1.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for leidenmark-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 953ba19cbc7069ad48bbf7c228cc44bbecec74691f67b0d9170ad09e64fba6c0 |
|
MD5 | e6fe991a519947b2299810f13e661680 |
|
BLAKE2b-256 | bb80bfd5f2d678f382f18bf2bb02a192be746a03a8b7475ede3a5ec8e6d9d2a2 |