odt2tei.py
877 Bytes
#!/usr/bin/python3
'Convert scanned ODT to TEI'
import argparse
from converter import Converter
def main():
'Main loop'
parser = argparse.ArgumentParser(
description='Convert ODT documents to PCC TEI')
parser.add_argument('filename', nargs='+', help='folder or filename')
parser.add_argument('-d', '--destination', default='output', metavar='<folder>',
help='folder to save data')
parser.add_argument('-v', '--verbose', default='', metavar='<folder>', help='category to debug',
choices=['', 'spaceout', 'markdown', 'speakers', 'comments',
'paragraphs', 'interpellations', 'punctuation'], )
args = parser.parse_args()
converter = Converter(args)
for filename in args.filename:
converter.convert(filename)
if __name__ == '__main__':
main()