Granular ISLE Customization
This post is part of a series describing Digital.Grinnell customizations to ISLE, in a “granular” format… one small customization at a time.
An index of all documents in this series is included at the end of Granular ISLE Customization: Series Guidelines.

Goal Statement

In this “granular” post we will install IMI, the Islandora Multi-Importer module, into an existing ISLE instance, for example: https://dg.localdomain/.

Install the Islandora Multi-Importer (IMI)

It’s important that we take this step BEFORE other customizations, otherwise the module may not install properly. The result is captured in this gist.

Apache Container Commands*
cd /var/www/html/sites/all/modules/islandora
git clone https://github.com/mnylc/islandora_multi_importer.git
chown -R islandora:www-data *
cd islandora_multi_importer
composer install
drush -y en islandora_multi_importer

An Alternative IMI Installation

The commands documented above will pull the “master” branch of the canonical IMI from mnylc, but if you’d like to take another of my features for a spin, try installing my fork (sync’d with the mnylc master on 04-Oct-2019), like so:

Apache Container Commands*
cd /var/www/html/sites/all/modules/islandora
git clone https://github.com/DigitalGrinnell/islandora_multi_importer.git
chown -R islandora:www-data *
cd islandora_multi_importer
git checkout Issue-15
composer install
drush -y en islandora_multi_importer

The feature that’s unique to this fork and branch is mentioned briefly in project “Issue” number 15.

Bonus: A Robust Twig Template for MODS

In my opinion, IMI’s greatest strength is the way it leverages Twig templates to translate CSV (comma-separated value) data into viable MODS metadata. And the real beauty in Twig is what you can do with it once you understand how it works.

While an exhaustive explanation of Twig is beyond the scope of this post, I can provide what I believe is a very robust Twig example, created specifically for MODS and IMI at Grinnell College. This is the template that currently drives ingest into Digital.Grinnell.edu. The template includes extensive comments up-front, and the current, revision 14, version is included in this Gist.

Installing the Template

This part is easy. To install the aforementioned Twig template, or any IMI template follow these simple steps:

  • Copy the entire contents of this Gist, or any suitable Twig template, to your paste buffer.
  • In your web browser, visit the /multi_importer#overlay=admin/islandora address of your Islandora instance, for example: https://dg.localdomain/multi_importer#overlay=admin/islandora/.
  • Choose Multi Importer Twig templates or /multi_importer#overlay=admin/islandora/twigtemplates in your Islandora instance.
  • Choose New Twig template or /multi_importer#overlay=admin/islandora/twigtemplates/create.
  • Paste the text of your Twig template into the available Twig Template Input window pane.
  • At the bottom of the form, enter a descriptive name for your template. In my case the name is Digital_Grinnell_MODS_Master.twig Revision 14.
  • Click Save Template.

Your Twig template is now ready for use. Enjoy!

And that’s a wrap. Until next time…