some utility function to interact with the Transkribus-API
Project description
acdh-transkribus-utils
A python package providing some utility functions for interacting with the Transkribus-API
Installation
pip install acdh-transkribus-utils
Usage
Authentication
Set Transkribus-Credentials as environment variables:
export TRANSKRIBUS_USER=some@mail.com
export TRANSKRIBUS_PASSWORD=verysecret
(or create a file called env.secret
similar to env.dummy
and run source export_env_variables.sh
)
you can pass in your credentials also as params e.g.
from transkribus_utils.transkribus_utils import ACDHTranskribusUtils
client = ACDHTranskribusUtils(user="some@mail.com", password="verysecret")
Download METS files from Collection
from transkribus_utils.transkribus_utils import ACDHTranskribusUtils
COL_ID = 51052
client = ACDHTranskribusUtils()
client.collection_to_mets(COL_ID)
# downloads a METS for each document in the given collection into a folder `./{COL_ID}
client.collection_to_mets(COL_ID, file_path='./foo')
# downloads a METS for each document in the given collection into a folder `./foo/{COL_ID}
client.collection_to_mets(COL_ID, filter_by_doc_ids=[230161, 230155])
# downloads only METS for document with ID 230161 and 230155 into a folder `./{COL_ID}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file acdh-transkribus-utils-2.5.tar.gz
.
File metadata
- Download URL: acdh-transkribus-utils-2.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc9765299a2babedc1cbabc70f9d5610a24978132202ccd4c6d4c1616ca9ce98 |
|
MD5 | 4c0e5bec9b66d871e432950b7d7c66f9 |
|
BLAKE2b-256 | 11734c7600437748d050b3d1b2aa5b1781afed897b44d6e29555ce72471ac5e2 |
File details
Details for the file acdh_transkribus_utils-2.5-py3-none-any.whl
.
File metadata
- Download URL: acdh_transkribus_utils-2.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4bddccf6d7fc5ed1a0bc1fea3edf6eace2df669207de6ee7d0a94ac195f369 |
|
MD5 | 2744fee5ae86c10d82a163ce7bc22d85 |
|
BLAKE2b-256 | 1fc1a0b8f5c75512336c5dae1a848ed5220668832d57dc5ad1676b8ab07552a5 |