Documentation of tropy-utilty
client.py
Client class.
- class tropy_utility.client.Client
Standalone client.
- items2transkribus(tropy_file_path, images_dir, transkribus_dir, flag=None)
Create a folder for each Tropy item that can be ingested into Transkribus.
The aim is to have one Transkribus document per Tropy item. Ingest the folders with the Transkribus FTP Client. Folder resp. document names are item titles (if any) or the item number otherwise.
- Parameters:
tropy_file_path (
str
) – complete path to Tropy export file including file extensionimages_dir (
str
) – the input directory of the images corresponding to the Tropy exporttranskribus_dir (
str
) – the target directory of the Transkribus exportflag (
Optional
[str
]) – only items with this tag will be processed, defaults to None
- Return type:
None
- selections2images(tropy_file_path, images_dir, selections_dir, flag=None)
Save all selections of all images of a Tropy project as new images.
For an item with image i, the selection j will be saved as image_i_selection_j. Select a subset of items via the flag parameter.
- Parameters:
tropy_file_path (
str
) – complete path to Tropy export file including file extensionimages_dir (
str
) – the directory of the images corresponding to the Tropy exportselections_dir (
str
) – the directory where the selections are to be savedflag (
Optional
[str
]) – only images of items with this tag will be processed, defaults to None
- Return type:
None