odt2tei.py 619 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')
    args = parser.parse_args()

    converter = Converter(args.destination)
    for filename in args.filename:
        converter.convert(filename)


if __name__ == '__main__':
    main()