Skip to content

Commit

Permalink
Update alto_tools.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cneud committed Sep 23, 2023
1 parent 325c503 commit fd191f9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/alto_tools/alto_tools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

""" alto-tools: simple tools for performing various operations on ALTO xml files """
""" ALTO Tools: simple tools for performing various operations on ALTO xml files """

import argparse
import codecs
Expand All @@ -10,7 +10,7 @@
import sys
import xml.etree.ElementTree as ET

__version__ = '0.0.3'
__version__ = '0.1.0'


def alto_parse(alto, **kargs):
Expand Down Expand Up @@ -120,7 +120,7 @@ def alto_confidence(alto, xml, xmlns):

def parse_arguments():
parser = argparse.ArgumentParser(
description="ALTO Tools: simple methods to perform operations on ALTO xml files",
description="ALTO Tools: simple tools for performing various operations on ALTO xml files",
add_help=True,
prog='alto_tools.py',
usage='python %(prog)s INPUT [options]')
Expand All @@ -146,14 +146,16 @@ def parse_arguments():
default=False,
dest='illustrations',
help='extract bounding box coordinates of illustrations from ALTO file')
parser.add_argument('-E', '--xml-encoding',
dest='xml_encoding',
parser.add_argument('-x', '--xml-encoding',
action='store_true',
default=None,
dest='xml_encoding',
help='XML encoding')
parser.add_argument('--file-encoding',
dest='file_encoding',
parser.add_argument('-e', '--file-encoding',
action='store_true',
default='UTF-8',
help='File encoding')
dest='file_encoding',
help='file encoding')
args = parser.parse_args()
return args

Expand Down

0 comments on commit fd191f9

Please sign in to comment.