A converter to help making your data compatible for import in eScriptorium.
Aspyre is a library. To install it, simply download aspyrelib/
and make sure to install the dependencies! Use from aspyrelib import aspyre
to import it in your program.
Start your project parsing all the required information with AspyreArgs() objects.
Process essential information to run Aspyre
:param scenario: keyword describing the scenario (string)
:param source: path to source file (string)
[opt] :param destination: path to output (string)
[opt] :param talkative: activate a few print commands (bool)
[opt] :param vpadding: value to add to VPOS attr. in String nodes (int)
supported values for
scenario
: "tkb", "pdfalto", "limb"
vpadding
is only used in PDFALTO and LIMB scenarios
Run Transkribus to eScriptorium (mainly resolve schema declaration, source image information).
Handle a Transkribus to eScriptorium transformation scenario
:param args: essential information to run transformation scenario (AspyreArgs)
Run PDFALTO to eScriptorium scenario (mainly resolve schema declaration, source image information and homothety)
Handle a PDFALTO to eScriptorium transformation scenario
:param args: essential information to run transformation scenario (AspyreArgs)
A legacy script (run.py
) from earlier stage enables you to use Aspyre as a CLI fairly easily.
- Export the transcriptions and the images from Transkribus; you now have a zip file
- Create a virtual environment based on Python 3 and install dependencies (cf. requirements.txt)
- Run aspyre/run.py (
python3 aspyre/run.py
) with the fitting options - See the CLI's options with --help* (
python3 aspyre/run.py --help
) - Aspyre will create a new ZIP that can be loaded onto eScriptorium
$ virtualenv venv -p python3
$ source venv/bin/activate
(venv)$ pip install -r requirements.txt
(venv)$ python3 aspyre/run.py -i /path/to/exported/documents
This is no longer an option, following Heroku's decision in 2021 to stop supporting free hosting services.
You can now access Aspyre as a service online (GUI)! ➡️ go to Aspyre GUI
Export the transcriptions and the images from Transkribus; you now have a zip fileIf your archive weighs more than 500 MB, remove the images from the zip file (unzip the archive and rezip it keeping only the alto/ directory and the 'mets.xml' file)Load the zip file onto the application and download the returned zip fileYou can now directly load this new ZIP onto eScriptorium
Export your data checking the “Transkribus Document” format option and checking the “Export ALTO” and “Export Image” sub-options.
Contenu minimum:
dossier(.zip)/
- out/
- identifiant.xml_data/
- image-1.png
- identifiant.xml
Pour le moment les archives tar.gz ne sont pas supportées. Seules les archives zip le sont.
If you notice unexpected errors or bugs or if you wish to add more complexity to the way Aspyre transforms the ALTO XML files, please create an issue and contribute!