Skip to main content

OpenITI mARkdown to TEI converter

Project description

oitei: OpenITI TEI Converter

This Python library converts an OpenITI mARkdown document and returns a TEI-XML string based on the OpenITI TEI Schema.

Installation

Set up a virtual environment with venv

python3 -m venv .env

Activate the virtual environment

source .env/bin/activate

Install

python setup.py install

Usage

import oitei
md = open("markdown.md", "r").read()
md.close()
tei_string = oitei.convert(md).tostring() # or just cast to string with str()
with open('tei.xml', 'w') as writer:
    writer.write(tei_string)

Coverage

This converter is based on the OpenITI mARkdown Parser, which covers the mARkdown specification.

The most common structures are currently converted to TEI, but other less common ones are still missing:

  • MorphologicalPattern
  • OpenTagAuto
  • OpenTagUser
  • RouteDist
  • RouteFrom
  • RouteTowa

There are also plans to convert to TEI YAML metadata provided with mARkdown files in the OpenITI corpus.

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

oitei-1.1.1.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

oitei-1.1.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

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