Skip to content

axelerant-hardik/islandora_drush_utils

 
 

Repository files navigation

Islandora Utilities

License: GPL v3

Introduction

Contains a set of utility Drush commands for Islandora.

Table of Contents

Features

  • Deleter command to recursively delete all related nodes, media, and files.
  • Generate thumbnails command to re-derive thumbnails for nodes.
  • Null child weight command to identify and update nodes with a mix of null and integer values in field_weight.
  • Re-derive command to re-derive all derivatives for a set of nodes.
  • A user wrapper to replace the legacy --user drush wrapper to support user in drush commands.

Requirements

This module requires the following modules/libraries:

Installation

Install as usual, see this for further information.

Usage

Deleter

drush islandora_drush_utils:delete-recursively -vvv --dry-run --empty 7,11 --user=islandora

Given a comma-separated list of nodes to target, this command performs a breadth-first search to find all descendent nodes and deletes them, including their related media, and marks files related to media as "temporary" such that they become eligible for garbage collection by Drupal.

Generate thumbnails

drush islandora_drush_utils:rederive_thumbnails --model=Image -vvv --nids=7,11 --user=islandora

Given a comma-separated list of nodes to target, this command will re-generate thumbnails for the target model. A file containing comma-separated nids can also be provided as input.

Re-derive

drush islandora_drush_utils:rederive -vvv --user=islandora

This command re-generates all derivatives on the website. It is possible to define which "media use" term should be used as the source for derivative generation. This defaults to Original file

Null child weight

drush islandora_drush_utils:null-child-weight-updater --verbose
--dry-run 10 --user=islandora

This command identifies and updates nodes that have a mix of null and integer values in field_weight.

Derivatives Generator

drush islandora_drush_utils:derivativesgenerator --model_name="Image" --user=islandora

Re-generates all derivatives for a given list of pids (comma separated list of pids or a file), model name or model uri. Specify 'media_use_uri' to target derivatives, defaults to 'http://pcdm.org/use#ThumbnailImage'.

User wrapper

--user=1

Before Drush 9, there was a "--user" option that could be used to run commands as other users. Here, a new "@islandora_drush_utils-user-wrap" annotation is provided, which can be used to allow the --user option in commands.

Troubleshooting/Issues

Having problems or solved a problem? Contact discoverygarden.

Maintainers and Sponsors

Current maintainers:

Sponsors:

Development/Contribution

If you would like to contribute to this module, please check out github's helpful Contributing to projects documentation and Islandora community's Documention for developers to create an issue or pull request and/or contact discoverygarden.

License

GPLv3

About

Contains a set of utility Drush commands for Islandora.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%