---
title: "Tools for digitising archives"
url: "https://edoardo.anteprime.edoardogabrielli.com/en/projects/digitisation"
lang: "en"
updated: "2026-11-01"
---

# Tools for digitising archives

> A desktop application to create and validate the XML metadata of digitised documents, with modules for cropping, renaming and page-type recognition, and a panel for users and licences.

A desktop application to create, correct and validate the XML metadata of digitised documents, with installable modules for working on the images.

### What it is for / What it can do

For anyone digitising archives and books who must describe each document with MAG metadata. It is part of the cataloguing and indexing work ETT offers under its Scripta line.

- Creates, corrects and validates MAG files, the Italian XML standard for digitised documents.
- Checks files against the XSD schema and extra rules.
- Crops and straightens scans automatically.
- Renames files and recognises the page type.
- Extends with installable modules, with licensing and updates.

[See the solution on ETT's site](https://ettsolutions.com/scripta/)

### Context

Whoever digitises archives and books produces thousands of images per document. Each one must be described in XML (page type, sequence, checksum, technical data), cropped and renamed, almost always by hand. The format is MAG, the Italian standard for metadata of digitised documents.

I develop it at the software company where I work as a developer. The project is a rewrite that merges two old programs (one in Python 2.4, one in compiled Python 3.8) into one that can be maintained.

## The editor and the validator

The editor shows the project as a tree and the metadata tabs (general, bibliography with repeatable Dublin Core fields, naming). The built-in validator checks the file against the XSD schema and extra rules, and lists the problems in a panel: in the image below, an empty required field. The document is an example.

![XML metadata editor with project tree and general metadata tab](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/c72c86b92d534992b5413318a966cdee/digitalizzazione-editor.webp)

![The validator reports an XSD schema error in the Problems panel](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/fc74b9d790334636bb8ef0d6ae04547d/digitalizzazione-validazione.webp)

The "Problems" panel reports an XSD schema error.

### The modules

Around the editor there are modules installed from an internal catalogue, each with a licence that is verified even offline and a signed update:

- **Crop and straighten**: the rectangle can be moved, resized from the corners and rotated with a dial. Each image is first brought down to a 1024-pixel version on which the detector and the operator work; with this choice the time per image went from 111 to 0.37 seconds.
- **Renaming** of files according to configurable conventions.
- **Page type**: a machine learning model suggests whether a page is a cover, text, plate and so on. It uses a classifier on 147 hand-built features and a search for the most likely sequence of labels; it learns from the operator's corrections.
- **Colour check**.

![Crop editor with rotatable rectangle on a test image](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/2c10ca88f38343cc895bd6699b4b99ac/digitalizzazione-ritaglio.webp)

Crop editor with the rotatable rectangle. The image is a synthetic test image.

### The management panel

For administrators there is a separate web panel: users, per-module licences with expiry and revocation, release of new versions. The screenshots below come from a test instance with invented data, not from the one in use.

## Management panel (test instance, fake data)

![Management panel: user list with fake data](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/54640f16286c4a8c8262d0bef7199e7e/digitalizzazione-utenti.webp)

![Management panel: licences per module grouped by user, with expiry and revocation](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/cd7c9002973746fb87bca5909ada9091/digitalizzazione-licenze.webp)

![Management panel: modules and versions](https://edoardo.anteprime.edoardogabrielli.com/media/originals/2026/11/7af81189db2649769e8138407c566838/digitalizzazione-moduli.webp)

### Some technical choices

- The interface is moving from Qt to Tauri with Vue; each module has its own small local Python service.
- Modules are distributed with SHA-256 checksum checks and signed updates, first on a test channel and then to everyone.
- The Qt test suite crashes if run all at once, because of shared library state: I wrote a runner that executes one file at a time.

### What I did

I wrote almost all the code myself, in about seven and a half months: more than 2,800 commits, about 200,000 lines of Python and 46,000 of Vue and TypeScript, covering the data model, validation, interface, modules, licences and panel. I also used AI coding agents; I have no measure of how much of the code came about that way.

### Status

It is in use, with real users and licences, and still under development. The program belongs to the company: it is not public and there is no demo. The Qt interface is still being phased out and some parts are unfinished.

### Stack

Python · lxml · Pillow · OpenCV · FastAPI · Tauri · Vue · TypeScript · gradient boosting · U²-Net · YOLO · Docker · pytest

[← All projects](https://edoardo.anteprime.edoardogabrielli.com/en/projects)