MarcusBarnes / mik

The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
GNU General Public License v3.0
34 stars 11 forks source link

Create a post-write hook that renames files to use PIDs from existing objects #478

Open mjordan opened 5 years ago

mjordan commented 5 years ago

It would be very useful to be able to produce MODS.xml files or others so they are named ready to be used as input to Islandora Datastream CRUD. The main use case here is using MIK to regenerate MODS files from CSV input for bulk replacement of bad or incomplete MODS datastreams (yes that is sadly a real thing) of MODS that were-good-enough-at-the-time-of-initial-ingest-but-now-that-collection-owners-have-changed-their-minds-we-need-to-replace-the-MODS. :disappointed:

Since Datastream CRUD requires that filesnames encode the target object's PID, e.g., islandora_1300_MODS.xml, this post-write script would need a filename -> CRUD-friendly filename map. This could be supplied in an external CSV file.