You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Gerber, Mike db79960ba1 Force singleton for shelfLocator
Very few input sources contain multiple mods:shelfLocator elements
for a mods:Location (illegal according to DFG MODS Anwendungsprofil).
Force a singleton in this case.

Fixes gh-7.
3 years ago
.circleci ✔️ CircleCI: - Python 3.5 + Python 3.10 3 years ago
.vscode ⚙️ Add VSCode settings 3 years ago
qurator Force singleton for shelfLocator 3 years ago
.editorconfig ⚙️ Add .editorconfig 3 years ago
.gitignore 🧹 .gitignore 3 years ago
LICENSE 📝 modstool: Add LICENSE 5 years ago
README.md 🚧 modstool: Replace Travis with CircleCI 4 years ago
requirements.txt 🐛 Fix install on Python 3.10 3 years ago
setup.py 🤪 modstool: Fix setup.py keywords 5 years ago

README.md

Extract the MODS metadata of a bunch of METS files into a pandas DataFrame.

Build Status

Column names are derived from the corresponding MODS elements. Some domain knowledge is used to convert elements to a useful column, e.g. produce sets instead of ordered lists for topics, etc. Parts of the tool are specific to our environment/needs at the State Library Berlin and may need to be changed for your library.

Usage

modstool /path/to/a/directory/containing/mets_files

Example

In this example we convert the MODS metadata contained in the METS files in /srv/data/digisam_mets-sample-300 to a pandas DataFrame under mods_info_df.pkl. This file can then be read by your data scientist using pd.read_pickle().

% modstool /srv/data/digisam_mets-sample-300
INFO:root:Scanning directory /srv/data/digisam_mets-sample-300
301it [00:00, 19579.19it/s]
INFO:root:Processing METS files
100%|████████████████████████████████████████| 301/301 [00:01<00:00, 162.59it/s]
INFO:root:Writing DataFrame to mods_info_df.pkl