mirror of
https://github.com/qurator-spk/modstool.git
synced 2025-06-07 19:05:06 +02:00
✨ Rename altotool to alto4pandas
See gh-15.
This commit is contained in:
parent
3d2e53f739
commit
21f906ec7d
4 changed files with 5 additions and 5 deletions
|
@ -20,7 +20,7 @@ from tqdm import tqdm
|
||||||
from .lib import TagGroup, sorted_groupby, flatten, ns
|
from .lib import TagGroup, sorted_groupby, flatten, ns
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('altotool')
|
logger = logging.getLogger('alto4pandas')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ def process(alto_files: List[str], output_file: str, output_csv: str, output_xls
|
||||||
INPUT is assumed to be a ALTO document. INPUT may optionally be a directory. The tool then reads
|
INPUT is assumed to be a ALTO document. INPUT may optionally be a directory. The tool then reads
|
||||||
all files in the directory.
|
all files in the directory.
|
||||||
|
|
||||||
altotool writes two output files: A pickled pandas DataFrame and a CSV file with all conversion warnings.
|
alto4pandas writes two output files: A pickled pandas DataFrame and a CSV file with all conversion warnings.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Extend file list if directories are given
|
# Extend file list if directories are given
|
|
@ -244,7 +244,7 @@ def sorted_groupby(iterable, key=None):
|
||||||
|
|
||||||
def _to_dict(root, raise_errors):
|
def _to_dict(root, raise_errors):
|
||||||
from .modstool import mods_to_dict, mets_to_dict
|
from .modstool import mods_to_dict, mets_to_dict
|
||||||
from .altotool import alto_to_dict
|
from .alto4pandas import alto_to_dict
|
||||||
|
|
||||||
root_name = ET.QName(root.tag)
|
root_name = ET.QName(root.tag)
|
||||||
if root_name.namespace == "http://www.loc.gov/mods/v3":
|
if root_name.namespace == "http://www.loc.gov/mods/v3":
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
|
||||||
from qurator.modstool.altotool import alto_to_dict
|
from qurator.modstool.alto4pandas import alto_to_dict
|
||||||
from qurator.modstool.lib import flatten
|
from qurator.modstool.lib import flatten
|
||||||
|
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -21,7 +21,7 @@ setup(
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'modstool=qurator.modstool.modstool:main',
|
'modstool=qurator.modstool.modstool:main',
|
||||||
'altotool=qurator.modstool.altotool:main',
|
'alto4pandas=qurator.modstool.alto4pandas:main',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
python_requires='>=3.0.0',
|
python_requires='>=3.0.0',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue