Skip to content

Drush script that can be used to bulk replace existing MODS datastreams.

License

Notifications You must be signed in to change notification settings

utkdigitalinitiatives/islandora_datastream_replace

Repository files navigation

Islandora Datastream Replace

Introduction

This module provides a Drush script that can be used to bulk replace existing MODS datastreams given a directory of files.

Requirements

This module requires the following modules/libraries:

Installation

Install as usual, see this for further information.

Troubleshooting/Issues

Usage

Output of drush islandora_datastream_replace --help:

Scans a source directory and replaces datastreams according to the given namespace and the filenames.

Examples:
 drush -u 1 islandora_datastream_replace --dsid=MODS --source=/tmp --namespace=islandora

Options:
 --namespace                               The namespace to match the pid named files with. Required.
 --dsid                                    The datastream id of the datastream. Required.
 --source                                  The directory to get the files of the datastreams from. Required.

The user option (-u) needs to be specified or errors could be encountered when attempting to write the contents of the datastream to a file.

How to Name Files

Islandora Datastream Replace expects files to be named with the namespace plus the pid plus the datastream id plus the extension all separated by underscopes.

For instance, if your namespace was scopes and your DSID was MODS, you filenames should look like this:

scopes_1_MODS.xml
scopes_10_MODS.xml
scopes_100_MODS.xml
scopes_11_MODS.xml

Maintainers/Sponsors

Current maintainers:

This project has been sponsored by:

Development

If you would like to contribute to this module, please check out our helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.

License

GPLv3

About

Drush script that can be used to bulk replace existing MODS datastreams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages