Read metadata from a CSV or MARC XML file and insert it into Thoth
Install dependencies:
pip install -r requirements.txt
Available modes, depending on publisher input: OBP
(Open Book Publishers), punctum
(punctum books), AM
(African Minds), UWP
(University of Westminster Press), WHP
(The White Horse Press), EDITUS
(Editus), EDUEPB
(EDUEPB), EDUFBA
(EDUFBA), Rosario
(Editorial Universidad del Rosario), Leuven
(Leuven University Press), LHarmattan
(L'Harmattan), MayFly
(MayFly Books), PlayStory
(Play Story Press)
./loader.py --file ./data/metadata.csv --mode ${mode} --email ${email} --password ${password}
./loader.py --file ./data/metadata.csv --mode ${mode} --email ${email} --password ${password} --client-url http://localhost:8080/graphql
docker run --rm \
-v /path/to/local/metadata.csv:/usr/src/app/metadata.csv \
openbookpublishers/thoth-loader \
./loader.py \
--file /usr/src/app/metadata.csv \
--mode ${mode} \
--email ${email} \
--password ${password}
docker run --rm \
--network="host" \
--volume /tmp/metadata.csv:/usr/src/app/metadata.csv \
openbookpublishers/thoth-loader \
./loader.py \
--file /usr/src/app/metadata.csv \
--mode ${mode} \
--email ${email} \
--password ${password} \
--client-url http://127.0.0.1:8000
Some loaders depend on the isbn_hyphenate
python library to add hyphens to ISBNs. The library contains a list of valid ranges for data validation, but was last updated in 2015, and new ranges have been added since then. Some newer ISBNs will cause the Thoth function sanitise_isbn()
, which depends on isbn_hyphenate
, to raise an IsbnUnableToHyphenateError
exception. In order to update the isbn_hyphenate
prefix list, follow directions at (https://github.com/TorKlingberg/isbn_hyphenate).