Skip to content

OpenITI/oitei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages