From 21f906ec7d50ab03f16ecbaf28a23e0ac9dab356 Mon Sep 17 00:00:00 2001 From: "Gerber, Mike" Date: Thu, 16 Jun 2022 19:27:54 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Rename=20altotool=20to=20alto4panda?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See gh-15. --- qurator/modstool/{altotool.py => alto4pandas.py} | 4 ++-- qurator/modstool/lib.py | 2 +- qurator/modstool/tests/test_alto.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename qurator/modstool/{altotool.py => alto4pandas.py} (98%) diff --git a/qurator/modstool/altotool.py b/qurator/modstool/alto4pandas.py similarity index 98% rename from qurator/modstool/altotool.py rename to qurator/modstool/alto4pandas.py index a66defa..ceb498a 100755 --- a/qurator/modstool/altotool.py +++ b/qurator/modstool/alto4pandas.py @@ -20,7 +20,7 @@ from tqdm import tqdm 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 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 diff --git a/qurator/modstool/lib.py b/qurator/modstool/lib.py index b3ce44f..a6be479 100644 --- a/qurator/modstool/lib.py +++ b/qurator/modstool/lib.py @@ -244,7 +244,7 @@ def sorted_groupby(iterable, key=None): def _to_dict(root, raise_errors): 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) if root_name.namespace == "http://www.loc.gov/mods/v3": diff --git a/qurator/modstool/tests/test_alto.py b/qurator/modstool/tests/test_alto.py index bc79d1d..154c848 100644 --- a/qurator/modstool/tests/test_alto.py +++ b/qurator/modstool/tests/test_alto.py @@ -1,7 +1,7 @@ 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 diff --git a/setup.py b/setup.py index cd19801..a35c92d 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup( entry_points={ 'console_scripts': [ 'modstool=qurator.modstool.modstool:main', - 'altotool=qurator.modstool.altotool:main', + 'alto4pandas=qurator.modstool.alto4pandas:main', ] }, python_requires='>=3.0.0',