PHPackages                             islandora-rdm/islandora\_bagger\_integration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. islandora-rdm/islandora\_bagger\_integration

ActiveDrupal-module[File &amp; Storage](/categories/file-storage)

islandora-rdm/islandora\_bagger\_integration
============================================

Islandora module to export content in Bagger format.

070PHP

Since Jan 21Pushed 4y agoCompare

[ Source](https://github.com/roblib/islandora_bagger_integration)[ Packagist](https://packagist.org/packages/islandora-rdm/islandora_bagger_integration)[ RSS](/packages/islandora-rdm-islandora-bagger-integration/feed)WikiDiscussions 8.x-1.x Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Islandora Bagger Integration
============================

[](#islandora-bagger-integration)

Introduction
------------

[](#introduction)

Drupal Module that allows user to create Bags with [Islandora Bagger](https://github.com/mjordan/islandora_bagger). Can be run in "remote" or "local" mode, as explained below.

Requirements
------------

[](#requirements)

- An [Islandora Bagger](https://github.com/mjordan/islandora_bagger) microservice
- [Islandora 8](https://github.com/Islandora-CLAW/islandora)
- [Context](https://www.drupal.org/project/context) if you want to define which Islandora Bagger configuration files to use other than the default file. A requirement of Islandora so will already be installed.

Installation
------------

[](#installation)

1. Clone this Github repo into your Islandora's `drupal/web/modules/contrib` directory.
2. Enable the module either under the "Admin &gt; Extend" menu or by running `drush en -y islandora_bagger_integration`.

Configuration
-------------

[](#configuration)

The admin settings form for this module requires the following:

1. A choice of whether you are running it in local or remote mode.
2. The absolute path on your Drupal server to the default Islandora Bagger configuration file. This file is used if no Contexts are configured to use an alternative configuration file.
3. If using remote mode
    1. the URL of the Islandora Bagger REST endpoint. If you are running Islandora in the CLAW Vagrant, and Islandora Bagger on the host machine (i.e., same machine that is hosing the Vagrant), use `10.0.2.2` as your endpoint IP address instead of `localhost`.
    2. an option to add to the configuration file the email address of the user who requested the Bag be created. If checked, the user's email address will be added to the configuration file using the key `recipient_email`. In addition, if this option is checked, the message displayed to the user will indicate they will receive an email when their Bag is ready for download.
4. If running in local mode, the absolute path to the directory on your Drupal server where Islandora Bagger is installed.

After you configure the admin setting, place the "Islandora Bagger Block" as you normally would any other block. You should restrict this block to the content types of your Islandora nodes, and to user roles who you want to be able to create Bags.

Usage
-----

[](#usage)

This module's interaction with Islanodra Bagger can be configured in two ways:

1. Using Islandora Bagger as a remote microservice ("remote" mode)
    - In this mode, submitting the "Create Bag" form does not directly generate the Bag; rather, it sends a request to the remote Islandora Bagger's REST interface, which in turn populates its processing queue with the node ID and the configuration file to use when that node's Bag is created.
    - In remote mode, this Drupal module does not notify the user when their Bag is ready; you will need to configure Islandora Bagger to send an email to the user indicating where they can get the Bag.
2. Using Islandora Bagger as command-line utility ("local" mode)
    - In this mode, submitting the "Create Bag" form calls out to Islandora Bagger on the server's shell, which then generates the Bag.

In both cases, end users generate a Bag for the current object by submitting a simple form (with just one button) in a block. If running in remote mode, the user is told that they will get an email indicating where they can download the Bag (the microservice needs to be configured to send this email); if running in local mode, the user is presented with a link where they can download the Bag.

The advantage of local mode is that the user is presented with the download link immediately after the Bag is generated. The disadvantage of the local mode is that creating the Bag is done synchronously, and there is a risk that, for objects that have very large files, the job will time out.

The advantage of the remote mode is that generating a Bag will never time out because clicking on the "Create Bag" button sends a simple REST request to the remote Islandora Bagger microservice, which then add the request to a queue to be processed later. This is also a disadvantage, since the user doesn't get to download the Bag until later.

Using Context
-------------

[](#using-context)

This module comes with two Context Reactions that provide control over the Islandora Bagger configuration.

### Using Context to define which configuration file to use

[](#using-context-to-define-which-configuration-file-to-use)

One of those Reactions allows you to use Islandora Bagger configuration files other than the default. To enable this, do the folowing:

1. Install Context and Context UI modules (requirements for Islandora, so will already be done).
2. Create a Context or edit an existing Context.
3. Define your Conditions.
4. Add the "Islandora Bagger Config File" Reaction.
5. Enter the absolute path on your Drupal server to the configuration file you want to use.

This module provides no mechanism for uploading configuration files via Drupal's web interface, so you will need access to the Drupal server's file system. Also, do not put configuration files in directories that are accessible via the web, since they contain credentials for accessing your Drupal's REST interface.

### Using Context to add or modify Islandora Bagger config settings

[](#using-context-to-add-or-modify-islandora-bagger-config-settings)

The other Reaction allows you to add options to the Islandora Bagger configuration file or override existing options. To enable this, do the folowing:

1. Install Context and Context UI modules (requirements for Islandora, so will already be done).
2. Create a Context or edit an existing Context.
3. Define your Conditions.
4. Add the "Islandora Bagger Config Options" Reaction.
5. Enter the options you want to add or modify. Add one option per line, using YAML syntax. For example:

```
serialize: tgz
bag-info: Contact-Email: admin@example.com | Custom-Tag: Some value.
plugins: AddBasicTags | AddMedia | AddFedoraTurtle

```

`bag-info`,`drupal_basic_auth`,`drupal_media_tags`, `plugins`, and `post_bag_scripts` are pipe-separated lists. For `bag-info`, each member of the list is a tag:value pair (separated by a colon). The other list options takes a pipe-separated list of values.

If the option's key exists in the configuration file, that option will be updated with the new value. If the option's key doesn't exist in the configuration file, it will be added. The only exception is `bag-info`: for this option, its values provided in the Context Reaction will be merged with any existing values from the configuration file. For example, if the Reaction contains a tag "Contact-Email: ", and the configuration file contains a "Contact-Email" tag, the existing one will be replaced by the one from the Reaction. If the Reaction contains a tag that does not exist in the configuration file, it will be added as a new tag.

Modifying the Islandora Bagger configuration from other modules
---------------------------------------------------------------

[](#modifying-the-islandora-bagger-configuration-from-other-modules)

This module defines a hook that allows other modules to modify the Islandora Bagger configration, in both remote and local modes. See `islandora_bagger_integration.api.php` for details.

To do
-----

[](#to-do)

See issue list.

Current maintainer
------------------

[](#current-maintainer)

- [Mark Jordan](https://github.com/mjordan)

License
-------

[](#license)

[GPLv2](http://www.gnu.org/licenses/gpl-2.0.txt)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/87d64fd6a56e2cd5f33910f3b8335ae839da6c00d1f98343ec96a780e000e276?d=identicon)[Roblib](/maintainers/Roblib)

![](https://www.gravatar.com/avatar/d38609715577ecc0e9e9f1a70334dc8dae9cbbdf5630e63073542893d9cc7239?d=identicon)[alxp](/maintainers/alxp)

![](https://www.gravatar.com/avatar/a9618ae081d2d28d8332e48d63cf86db3b0655e7666b9c94cf7a006a06e011e2?d=identicon)[ppound](/maintainers/ppound)

---

Top Contributors

[![mjordan](https://avatars.githubusercontent.com/u/403918?v=4)](https://github.com/mjordan "mjordan (48 commits)")[![alxp](https://avatars.githubusercontent.com/u/82412?v=4)](https://github.com/alxp "alxp (4 commits)")[![ajstanley](https://avatars.githubusercontent.com/u/494887?v=4)](https://github.com/ajstanley "ajstanley (2 commits)")

---

Tags

islandora8rdm-085

### Embed Badge

![Health badge](/badges/islandora-rdm-islandora-bagger-integration/health.svg)

```
[![Health](https://phpackages.com/badges/islandora-rdm-islandora-bagger-integration/health.svg)](https://phpackages.com/packages/islandora-rdm-islandora-bagger-integration)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
