Overview

I previously wrote the following article about how to use the “Bulk Import” module for batch registration of metadata (items) and images (media) into Omeka S.

https://nakamura196.hatenablog.com/entry/2021/07/28/080952

However, due to updates to Omeka S and its modules, some behaviors differ as of March 2023. In this article, I will re-introduce the entire workflow from item set registration to media registration, while leaving the detailed explanations to the article above.

Module Installation

Installing Required Modules

First, install the following two modules, “Log” and “Generic.”

https://github.com/Daniel-KM/Omeka-S-module-Log

https://github.com/Daniel-KM/Omeka-S-module-Generic

(Optional) Log Configuration

After installing the Log module, an alert like the one below will be displayed. Modifying the config/local.config.php settings allows you to check error details when using Bulk Import, which is convenient.

Specifically, in /config/local.config.php, set log to true.

return [
    'logger' => [
'log' => true, //Change this to true
'priority' => \Laminas\Log\Logger::NOTICE,
    ],
    'http_client' => [
'sslcapath' => null,
'sslcafile' => null,
    ],
    ...
]

With this setting, logs like the ones below will be displayed during the batch registration described later. This is particularly helpful for investigating the cause when batch registration does not work as intended.

Installing Bulk Import

Install from the following repository.

https://github.com/Daniel-KM/Omeka-S-module-BulkImport

After installation, the settings screen below will appear, but you can leave it as is for now.

Registering Item Sets

First, register the item sets. From the import screen, select “CSV - Item sets” as shown below.

Download the following CSV file as sample data.

https://github.com/omeka-j/Omeka-S-module-BulkImport-Sample-Data/blob/main/item_set.csv

Select the downloaded file.

On the next screen, there are various settings, but you can leave them at their default values for now.

Once registration is complete, the title (dcterms:title) and identifier (dcterms:identifier) will be registered as shown below.

Registering Items

Next, register the items. Use the following CSV file.

https://github.com/omeka-j/Omeka-S-module-BulkImport-Sample-Data/blob/main/item.csv

For details about the CSV file contents, please refer to the article mentioned at the beginning.

https://nakamura196.hatenablog.com/entry/2021/07/28/080952#アイテム

An important note: in the settings screen under “Identifier to use for linked resources or update,” add “dcterms:identifier.” This is because the item set is specified using the value baby, which refers to the item set whose “dcterms:identifier” is “baby.” Therefore, you need to add “dcterms:identifier” as the “Identifier to use for linked resources or update.” Without this setting, the system will report that the associated item set (baby) cannot be found, and you will be unable to register the sample data (2 records).

On the other hand, if you remove the item set-related columns from the CSV file being registered, you can register without the above setting. However, having an identifier (typically dcterms:identifier) is more convenient when linking and updating resources.

Registering Images

Next, register images. Use the following CSV file.

https://github.com/omeka-j/Omeka-S-module-BulkImport-Sample-Data/blob/main/media.csv

Here as well, as mentioned above, add “dcterms:identifier” under “Identifier to use for linked resources or update” in the settings screen. This setting is necessary because the value of “dcterms:identifier” is used to specify the item to which the media (images) should be registered.

As a result, media (images) are registered to the items as shown below.

Supplement: Registering Multiple Values

In the CSV file used for batch item registration, the value for “dcterms:subject @ja” was specified as follows:

あかちゃん|リクエスト

This is the notation for registering multiple values separated by a pipe (|) character. This separator can be changed in the registration settings screen. Specifically, it is specified in the “Multi-value separator” field.

As a result, multiple values are registered for the “Subject” field.

Summary

This module provides a wide range of features, including resource updating and deletion. It is a very useful module, but it also has many configuration options, which may feel somewhat difficult to use until you get accustomed to it.

I hope this article serves as a useful reference when using this module.