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
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
Close
Hashes for acdh-transkribus-utils-2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30ed320123d18760c05afed570742e32de7f08a17b6e58d2f3664bf764fbb123 |
|
MD5 | 88ce36498b7ac35e17a86f2919fa42bb |
|
BLAKE2b-256 | 2085e0c051904749b3fa91bf90fa3633624259a39525d7f820283f61471abf3b |
Close
Hashes for acdh_transkribus_utils-2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e836a3eb6ef0e4b64873fa1fb38227c3c9e24573960ee42b839e1af56f731333 |
|
MD5 | 5753ba3af32d650457487f29fd1405e4 |
|
BLAKE2b-256 | a2e82df78a696581e06db3c090df10ca3bfcc637a355f7b601408bed68d6a87a |