Transkribus Metagrapho API Client.
Project description
Transkribus Metagrapho API Client
Usage
with ContextManager
from time import sleep
from transkribus_metagrapho_api import transkribus_metagrapho_api
with transkribus_metagrapho_api(USERNAME, PASSWORD) as api:
process_id = api.process(IMAGE_PATH, line_detection=49272, htr_id=51170)
while True:
match api.status(process_id).upper():
case "FINISHED":
print(api.apge(process_id))
break
case "FAILED":
print("FAILED")
break
sleep(10)
or
with transkribus_metagrapho_api(USERNAME, PASSWORD) as api:
for image_path, page_xml in zip(IMAGES, api(IMAGES*, line_detection=49272, htr_id=51170)):
with open(
Path(image_path.parent, image_path.name.replace(image_path.suffix, ".xml")),
"w",
encoding="utf8"
) as f:
f.write(page_xml)
from command line
$ python3 -m transkribus_metagrapho_api --username USERNAME --password PASSWORD --images images/*.tiff
Project details
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 transkribus_metagrapho_api-0.1.4.tar.gz
.
File metadata
- Download URL: transkribus_metagrapho_api-0.1.4.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4898a5ccfe6f175e9dcb5475b978810420fe023ff3e0114373b2a2b953be4e7 |
|
MD5 | a4d4e67f664f8cd5f3a08fba077aa856 |
|
BLAKE2b-256 | 51433aaccf0be326afce293cb3637de831a23eb49d07f639a7f30d50f2beb654 |
File details
Details for the file transkribus_metagrapho_api-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: transkribus_metagrapho_api-0.1.4-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df86902bef0c7891ed4f7b1fc6ef033e2735d7bdf9f57f1d18c7d1c0e775d447 |
|
MD5 | a2fd987bc13a2c0676ff3f1968ca5972 |
|
BLAKE2b-256 | afe634750a8ab9c8cedccc9976c1b01046b38b9429470de0b52f49f0d8b9713e |