Giter Site home page Giter Site logo

leidenuniversitylibrary / islandora_batch_modify Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 76 KB

Modify islandora objects in batch: add/replace datastreams, generate missing (derivative) datastreams, change the label or owner of an object, set the state of an object, change the label of a datastream or delete a datastream, remove from or add to collection.

License: GNU General Public License v3.0

PHP 100.00%
islandora batch modification

islandora_batch_modify's Introduction

Islandora Batch Modify

===========================

Introduction

With this module it is possible to modify islandora objects in batch. You can add new datastreams, generate missing (derivative) datastreams, change the label or owner of an object, set the state of an object, change the label of a datastream or delete a datastream. Also you can add an object to a collection or remove it from a collection.

Web interface

Go to the URL https://[islandora-server]/islandora_batch_modify. Here you can upload a CSV file or ZIP file. The ZIP file should contain at least a CSV file (named the same as the base name of the ZIP file). The CSV file should be formatted as descripted in the section CSV format.

Notice: due to long loading times, it is recommended to use the command line version of this module (see drush below) if there are more than 100 items involved.

drush

You can also use this module via the command line with drush.

The command you can use is:

islandora_batch_modify

This command needs only 1 option csvfile with an absolute path to a csv file. Use this with a user with appropriate rights.

Examples:

 - drush -v --user=admin islandora_batch_modify --csvfile=/tmp/test.csv
 - drush -v --user=admin ibm --csvfile=/tmp/test.csv

CSV format

The provided CSV file (uploaded via the Web Interface directly or part of a ZIP file, or as an option of the drush command) should have 2 or 3 columns. It may have a header row. The columns must have the following values:

  1. An identifier of an Islandora object. This can also be an (unique) identifier within the metadata datastream of an object.
  2. This value can be one of these:
    • a valid datastream id, such as MODS, TN, JPG.
    • HDL if you want to (re)generate the handle.
    • DIMENSIONS if you want to (re)generate the image dimensions of a book or newspaper page (inside the RELS-INT).
    • a property of the object: property:label, property:owner, property:state.
    • a property of a datastream of the object: property:DSID:label, property:DSID:state
    • 'add_to_collection' (for adding the object to a collection)
    • 'remove_from_collection' (for removing the object from a collection)
    • 'generate_ocr', 'generate_hocr' or 'generate_all_ocr' (for generating OCR, HOCR or both OCR and HOCR for pages, generate_ocr will aggregate pre-made OCR of pages)
    • 'basic2large' (for changing a basic image to a large image)
  3. This value can be:
    • empty. This can only be used with a valid datastream id in column 2 which can be generated (so is a derivative).
    • the value 'generate' is also possible to generate the derivative.
    • the value 'regenerate' to force regenerate the derivative (will regenerate the derivative even if it existed already).
    • a filename. Use only when there is a valid datastream id in column 2. This file name will be the new datastream for this id:
      • When using the Web interface, this should be a filename that exists within the ZIP file.
      • When using drush this should be an absolute filepath.
    • the value for the property of the object. It should not be empty. In case of property:state the valid values are A, I or D (Active, Inactive or Deleted).
    • the value for the property of a datastream of the object. It should not be empty. In case of property:DSID:state the only valid value is D (Deleted). This will delete the datastream.
    • a collection id when used with 'add_to_collection' or 'remove_from_collection'. This should be the id of an existing collection.
    • a three-letter language identifier used with 'generate_*ocr'.
    • an absolute filepath to an image file suitable for large images (only with basic2large in column 2).

Requirements

This module requires the following modules/libraries:

Installation

Install as usual, see this for further information.

Configuration

No further configuration is needed to use this module.

Maintainers/Sponsors

Current maintainers:

Development

If you would like to contribute to this module, please contact the current maintainer.

License

GPLv3 Copyright 2017 Leiden University Library

islandora_batch_modify's People

Contributors

lucasvanschaik avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.