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 extension

  • images_dir (str) – the input directory of the images corresponding to the Tropy export

  • transkribus_dir (str) – the target directory of the Transkribus export

  • flag (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 extension

  • images_dir (str) – the directory of the images corresponding to the Tropy export

  • selections_dir (str) – the directory where the selections are to be saved

  • flag (Optional[str]) – only images of items with this tag will be processed, defaults to None

Return type:

None

Indices and tables