Scripts for migrating media-files and corresponding data between a museum's Collections Management System (EMu) and DAMS (NetX).
See data/README.md for examples of how to setup NetX-EMu mappings and properties config files.
A given Multimedia asset will be pointed at its Netx destination folder based on these fields:
- emultimedia.SecDepartment_tab
- 1st Security Department value is the initial NetX folder
- Subsequent Department values are pathAdd NetX folders
- EMu MulIdentifier -> NetX "EMu File Name" (NetX attribute)
- EMu AudIdentifier -> NetX "Filename" (name of asset file in NetX)
- Multimedia fields from the NetX emultimedia" export are mapped in syncedMetadata.xml
- Reverse-attached Event fields:
- "EveEvent" is a concatenation of:
- eevents.EveEventNumber
- eevents.EveTypeOfEvent
- eevents.EveEventTitle (not all Events have EveShortName)
- "EveEventURLs" is a concatenation of:
- "https://pj.fieldmuseum.org/event/" + eevents.AdmGUIDValue
- "EveEvent" is a concatenation of:
- Reverse-attached Catalogue fields:
- ecatalogue.CatDepartment
- ecatalogue.CatCatalogue
- In EMu, run the "NetX emultimedia" Multimedia export
python3 prep_emu_media.py [path/to/input-emu-netx-export.xml] [path/to/output.csv] [LIVE/test]
This script takes an emultimedia XML export and copies each record's main Multimedia file into the appropriate folder location for NetX IO to import files to NetX. The appropriate folder is defined by the SecDepartment values from EMu. The newly copied file's name is the AudIdentifier value from EMu. Once complete, NetX IO can be run in watchedFolder mode to ingest the organized, renamed files to NetX -- a prerequisite to running NetX DSS. (see example below)
- Files renamed to AudIdentifier-values (with original file extension).
- File paths defined by SecDepartment values in a folder-structure that follows the
DEPARTMENT_CSV
hierarchy.
DESTIN_PATH_MEDIA
andDEPARTMENT_CSV
should be defined in your.env
file. See example here.
...like so:
Filename | File path
-|-
123-abc-987-def.jpg | Multimedia/Geology/Paleobotany/
python3 prep_emu_xml.py [path/to/input-emu-netx-export.xml]
This script takes the same emultimedia XML export as prep_emu_media.py, and reshapes it into the corresponding DSS XML input-file.
The DSS XML input-file dss_prepped.xml
is stored at the DESTIN_PATH_XML
location defined in .env
For NetX, ingest this to the NetX front-end synced-metadata folder for the DSS autotask to pick up on its next run.
If EMu Multimedia records are indexed in a MongoDB database, this script can generate a IIIF manifest for a given EMu IRN. Related EMu workflow for 3D media in need of IIIF manifests is here The IIIF manifest outputs as a JSON file as well as to the console. For more info about IIIF setup, see iiif.io
-
In the
env
file, define the following 5 MongoDB and IIIF variables:MONGO DB INFO
MONGO_DB
- add user credentials and login string to log into your MongoDB setup
IIIF INFO - default values in
.env.example
can work if you're testing locally within this repoIIIF_SCHEMA
- path to a IIIF schema json file (e.g. "data/config/iiif_schema.json" within this repo)IIIF_OUT_HOST
- path to the domain where an output IIIF manifest JSON file will be hosted (e.g. while testing, could use the path to raw content in your GitHub repo: "https://raw.githubusercontent.com/[your_gh_id]/dams-netx/main")IIIF_OUT_PATH
- writeable path to a sub-directory on that domain &/or in this repo (e.g. "data/iiif")IIIF_OUT_FILE
- name of the output manifest JSON file (e.g. "manifest.json")
-
Run the script for a given EMu irn present in MongoDB:
python3 mongo_to_IIIF.py [EMu IRN]
- e.g.:
python3 mongo_to_IIIF.py 2441464
- e.g.:
-
Output IIIF Manifest JSON will be displayed in the console, and output to the path & file defined in your
.env
- e.g., see example output manifests in data/iiif
dams-beam
- to cross-check and manage media from BEAMEMu-xml-to-json
- to prep EMu XML for input todams-netx
(among other things)