Skip to Content
Pangur docs

Import from Tropy

A Tropy project exported as JSON-LD can be imported into a Pangur project. This page explains what each Tropy item becomes, what happens to its template fields, tags, lists and notes, and how its photographs are brought in as the record's facsimile.

Tropy organises photographs taken in an archive. In Tropy an item is one document, such as a letter or a volume, described through a template and holding its photographs in order. Pangur can import those items, so that each document becomes a record in your library with its photographs as the record's facsimile, ready to be read and transcribed.

Pangur reads the export that Tropy writes, not the Tropy project file itself. The export is a text file in the JSON-LD format that lists the items with their descriptions, notes and the place of each photograph on your computer. It does not contain the photographs, so they are brought in as a second step.

Exporting from Tropy

In Tropy, select the items you want, or all the items of the project, and choose File › Export › JSON-LD. Save the file with the extension .json or .jsonld. The file can be up to 5 MB, and one export can hold up to 5,000 items; a larger project can be exported a list at a time.

What each item becomes

Each Tropy item becomes one record. The record is a letter if the item uses Tropy's Correspondence template, has a recipient, or gives a type that mentions a letter or correspondence. Otherwise it is a manuscript. The fields of the item's template are placed as follows:

In TropyIn Pangur
TitleTitle. An item with no title takes the title of its first photograph.
Creator or AuthorAuthor. A name written as "Surname, Forename" is split into its two parts, and several names separated by semicolons become several authors.
RecipientRecipient, on a letter. On a manuscript the recipient is kept in the Extra field.
DateDate
TypeType of the manuscript or letter
SourceArchive
Collection, Box, Folder, IdentifierLocation in archive, joined in that order, for example GD 112, Box 39, Folder 7, GD112/39/7/2. This is the record's shelfmark.
RightsRights
DescriptionAbstract
LanguageLanguage
Coverage or placePlace, on a manuscript. On a letter the place is kept in the Extra field.
Any other field of the templateThe Extra field, as a line of the form Field: value
The templateThe Extra field, as Tropy template: …
TagsTags
ListsCollections, one for each list the item is in
NotesChild notes

Pangur recognises a field by the property the template gives it, not by its label, so a custom template is read in the same way as Tropy's own. A field that has no place in a Pangur record is never dropped: it is kept in the Extra field under the name of its property.

Every note in Tropy belongs to a photograph or to a selection of a photograph. Each one becomes a child note of the record, headed by the photograph it was on, such as "Photograph 3: IMG_0412" or "Photograph 3: IMG_0412, selection 1". Bold, italics, lists, quotations and links in a note are kept, and other formatting is removed. The position of a selection on its photograph is not imported.

Importing the export

  1. On Home, choose From document.
  2. Choose Choose a file and select the export.
  3. Pangur lists the items. Tick the ones to import, or use Select all, and choose Import selected.
  4. Choose where to file them under File into collection, and leave fetch open-access PDFs unticked, as it starts for a Tropy export: an archive document has no published PDF to find.
  5. Choose the import button again to start.

These are the steps for any reference file, which Import a reading list or reference file describes in full. Import the items together in this way, and not one at a time with a row's own Import button, because the photographs are offered only after an import of the ticked items.

An item is treated as already in your library, and is not imported again, only if a record has both the same title and the same location in archive. Two documents that share a title, such as two sets of minutes, are therefore both imported as long as their shelfmarks differ.

The limits are those of any reference file: up to 2,000 items in one import.

Bringing in the photographs

When the import has finished, the dialog shows a Photographs panel that says how many photographs the export names. Choose the photographs, or choose the folder that holds them, and Pangur sends each one to the record of its item. Pangur matches a photograph to its item by file name, so the photographs do not need to be in the place the export recorded, but two different photographs with the same file name cannot be told apart.

The photographs of an item become its facsimile, in the order they had in Tropy. When the record has both an archive and a location in archive, the photographs are filed under that shelfmark, as photographs of a manuscript are (Photograph a manuscript); otherwise they are attached to the record alone. A photograph can be up to 100 MB, in HEIC, JPEG, PNG, TIFF or WebP format, and a photograph that Pangur already holds is not stored twice.

When the upload has finished, the panel reports how many photographs were saved, how many were already in your library, and how many named in the export were not among the files you chose. You can choose more files to bring in the ones that were missed.

From the command line

pangur import refs reads a Tropy export as it reads any reference file. With --attach-files it also uploads the photographs, which it looks for where the export says they are and then beside the export file:

pangur import refs export.json --attach-files

This imports the items, waits for the import to finish, and uploads each item's photographs as the facsimile of its record. --dry-run shows how many items and photographs there are without importing anything. The options are listed in the command-line reference.

What is not imported

Pangur does not import the photographs' own metadata fields, the positions of selections, or the adjustments to an image, such as brightness, contrast and rotation, that you made in Tropy. Tropy's lists are imported by name only, so a list nested inside another arrives as a collection at the top level.

Next steps

On this page