A tool for building import sheets from UTK legacy systems
Project description
UTK Exodus :flight_departure:
About
This application is a complete rewrite of the code used to migrate UTK content from Islandora 7 to Hyku.
Unlike the previous code, this aims to be more flexible, easier to understand, and easier to use as a whole.
Installing
To install for use, ideally use pipx
:
pipx install utk_exodus
The above will install the application in a virtual environment and make it available to you where ever you are in your path so you can use it from anywhere without needing to understand the intricacies of Python.
If you don't want to use pipx
, you can install the whole library with the following command but do so mindfully:
pip install utk_exodus
Using
There are several interfaces for the application.
If you want to get works and files, and you have metadata files, use::
exodus works_and_files --path /path/to/metadata -o /path/to/directory/to/store/files
If you want to get works and files, and you don't have metadata files, you need to specify a collection and a work type:
exodus works_and_files --collection "namespace:identifier" --model book -o /path/to/output/directory
If you just want works, use:
exodus works --path /path/to/metadata
If for some reason you need to create a files sheet for works after the fact, use:
exodus add_files --sheet path/to/sheet.csv --files_sheet path/to/files_sheet.csv
Understanding Configs
Exodus uses yml
files for migration. By default, exodus treats everything agnostically and relies on the xpaths
section of the base mapping to determine how a concept is mapped. If a property (or properties) have complex rules, a
class can be written to handle the special case. When this happens, the yml
should have a special
property, and
it should be defined in MetadataMapping().__lookup_special_property()
.
An agnostic property should look like this in the yml
:
- name: table_of_contents
xpaths:
- 'mods:tableOfContents'
property: "http://purl.org/dc/terms/tableOfContents"
A complex property might look like this:
- name: title_and_alternative_title
xpaths:
- 'mods:titleInfo[not(@supplied)]/mods:title'
- 'mods:titleInfo[@supplied="yes"]/mods:title'
properties:
- "http://purl.org/dc/terms/title"
- "http://purl.org/dc/terms/alternative"
special: "TitleProperty"
An agnostic property must always have the property
property while a complex property may have property
or
properties
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for utk_exodus-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fc1f5a9fed9e25f68ad826c9538e1d07f288358a48f31016e081bca06a9fa4 |
|
MD5 | 2535810c1494bdd19629a82b74f29dbe |
|
BLAKE2b-256 | 646428d56a9d7cb50edf664a0e4fd46bf46aa14783250dd3b3d2c352655b90db |