Omeka S Module Introduction: HistoryLog - Recording Change History

Overview As of 2023/07/20, this module appears to still be in beta, but I had the opportunity to try out “Omeka-S-module-HistoryLog,” a module for recording change history in Omeka S. Here are my notes. https://github.com/Daniel-KM/Omeka-S-module-HistoryLog Installation As noted in the documentation, you may need to install the Generic module beforehand. https://github.com/Daniel-KM/Omeka-S-module-HistoryLog#installation Otherwise, the installation procedure is the same as for standard modules. After installation, the module will appear in the module list as shown below. ...

July 20, 2023 · 1 min · Nakamura

Updated Mirador to 2.7 in the Omeka Classic IIIF Toolkit

Overview I updated Mirador to 2.7 in the Omeka Classic IIIF Toolkit. You can check the source code on the following page. https://github.com/nakamura196/IiifItems You can also download the zip file from the following URL. https://github.com/nakamura196/IiifItems/releases/download/1.1.1/IiifItems-1.1.1.zip What This Enables By using Mirador 2.7, it becomes possible to display images in the viewer even if they do not support the IIIF Image API. This makes it possible to add and manage annotations using Mirador for publicly available images as well. ...

July 20, 2023 · 1 min · Nakamura

Health Checking Virtuoso Running on Amazon EC2

Overview I had the opportunity to set up health checks for Virtuoso running on Amazon EC2, so this is a memo of the process. Specifically, when Virtuoso (e.g., https://xxx.zzz/sparql) starts returning errors due to some issue, the details are sent via email notification. Method The following article introduces how to set up a Virtuoso RDF store on Amazon EC2. The above setup uses an ELB. Only one change needs to be made from the above article. The Health check path was set to /, but this should be changed to the path to the SPARQL endpoint (e.g., /sparql). ...

July 14, 2023 · 2 min · Nakamura

Using zoomTo in OpenSeadragon to Satisfy Viewport Constraints

After using the zoomTo method in OpenSeadragon, you can call viewport.applyConstraints() to ensure the viewport is adjusted to satisfy the configured constraints. This is useful when zoom or pan operations exceed the viewport constraints. Here is an example: // `viewer` is an OpenSeadragon instance const zoomLevel = 2.0; viewer.viewport.zoomTo(zoomLevel); viewer.viewport.applyConstraints(); In the code above, we first set the viewport zoom level to a specified value. Then, by calling the applyConstraints method, the viewport is adjusted to satisfy its constraints. In other words, if the specified zoom level exceeds the configured constraints, the zoom level will be adjusted to fit within those constraints. ...

July 10, 2023 · 1 min · Nakamura

Difference Between `fitBounds` and `fitBoundsWithConstraints` in OpenSeadragon (OSD)

(The following is a response from ChatGPT. I hope it serves as a helpful reference.) The difference between fitBounds and fitBoundsWithConstraints in OpenSeadragon (OSD) lies in whether or not constraints are applied. OSD is a JavaScript library with advanced zoom and panning capabilities, used for handling deeply zoomable images and content. Among its methods, fitBounds and fitBoundsWithConstraints are used to fit the viewport (display area) to specific bounds. fitBounds(rectangle, immediately): Fits the viewport to the specified rectangle. If the immediately parameter is true, the viewport fits instantly without animation. If false, the viewport fits with animation. ...

July 10, 2023 · 1 min · Nakamura

How to Bulk Delete Collections in Omeka Classic

Overview This article introduces one approach for bulk deleting collections in Omeka Classic. In Omeka Classic (Version 3.1.1), there is no GUI for selecting and deleting multiple collections at once. However, this functionality is available for items. Therefore, we will use the API to perform bulk deletion of collections. Obtaining the API Key Follow the instructions below to enable the API and generate an API key: https://omeka.org/classic/docs/Admin/Settings/API_Settings/ Specifically, first access the following page: ...

June 27, 2023 · 1 min · Nakamura

Guide to the IIIF Mirador 2 Annotation Interface

Overview This article explains (part of) how to use the annotation interface in IIIF Mirador 2. Creating Rectangle Annotations https://www.youtube.com/watch?v=jny09nLZvLU Creating Path (Polygon) Annotations To finish an annotation, double-click. https://www.youtube.com/watch?v=4cM-6-rXL9M Editing Existing Annotations https://www.youtube.com/watch?v=HlE36inbgq4 Deleting Existing Annotations https://www.youtube.com/watch?v=STk2vjLc_-k Summary I hope this is helpful when creating annotations using IIIF Mirador 2.

June 21, 2023 · 1 min · Nakamura

Using the Archivematica API to Perform Transfer Through AIP Download

Background I was able to perform the process from Transfer through AIP download using the Archivematica API, so I am documenting it here. Previously, I wrote separate articles about using the Archivematica API and the Storage Service API. This time, I combine the above to perform the process from Transfer through AIP download. Method I documented the method in the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/ArchivematicaのAPIを使ってみる.ipynb Summary I hope this serves as a helpful reference for using the Archivematica API. ...

June 16, 2023 · 1 min · Nakamura

Setting Default Sort Order for Items Displayed on Per-Item-Set Pages in Omeka S

Overview This article describes how to set the default sort order for items displayed on per-item-set pages in Omeka S. Specifically, this concerns the initial sort order for screens like the following. By default, it is set to “Date created” in “Descending” order. The method differs between Omeka v4 and v3, so I’ll explain each below. v4 Access the following per-site settings screen. /admin/site/s/#site-settings Then, set the field and ascending/descending order in the “Item browse defaults” section below. ...

June 16, 2023 · 2 min · Nakamura

Sorting and Pagination in Strapi v4 GraphQL

I looked into how to perform sorting and pagination with Strapi v4’s GraphQL. Documentation was found at the following location. https://docs.strapi.io/dev-docs/api/graphql Specifically, pagination and sorting could be performed by writing queries like the following. query { blogPosts(pagination: {page: 1, pageSize: 10}, sort: "createdAt:desc") { meta { pagination { total } } data { id attributes { createdAt } } } } I hope this serves as a helpful reference.

June 16, 2023 · 1 min · Nakamura

Enabling OpenAPI in Drupal

Overview I had the opportunity to enable OpenAPI in Drupal, so this is a memo. Note that the JSON:API module has already been enabled. Installing Modules Install the following two modules. https://www.drupal.org/project/openapi https://www.drupal.org/project/openapi_jsonapi As a result, JSON can be obtained from the following URL. /openapi/jsonapi Accessing the following displays “No UI …”. Next, let’s add a UI. /admin/config/services/openapi Adding a UI Install the following two modules. https://www.drupal.org/project/openapi_ui https://www.drupal.org/project/openapi_ui_redoc ...

June 14, 2023 · 1 min · Nakamura

Using OpenSeadragon and OpenSeadragon SVG Overlay with Nuxt3

Overview I created examples of using OpenSeadragon and OpenSeadragon SVG Overlay with Nuxt3. The image used is (Catfish with Ofuda on Kaname-ishi) “National Diet Library Collection”. OpenSeadragon https://nuxt3-demo-nine.vercel.app/osd OpenSeadragon SVG Overlay https://nuxt3-demo-nine.vercel.app/osd-svg Method A key point was preparing a plugin file as shown below. This resolved issues that occurred during SSR. https://github.com/nakamura196/nuxt3-demo/blob/main/plugins/osd.client.js For the SVG overlay implementation, I referenced the following. https://github.com/openseadragon/svg-overlay/blob/master/openseadragon-svg-overlay.js Summary There may be better ways to write this, but I hope it is helpful for using OpenSeadragon with Nuxt3. ...

June 14, 2023 · 1 min · Nakamura

Disable UI: Using Drupal as a Headless CMS

I had the opportunity to use Drupal as a headless CMS and tried the Disable UI module, which restricts UI access to administrators and similar roles. https://www.drupal.org/project/disable_ui As a result, access to the top page was displayed as follows. On the other hand, the enabled JSON:API was accessible to non-logged-in users. /jsonapi/ We hope this serves as a useful reference when using Drupal as a headless CMS.

June 9, 2023 · 1 min · Nakamura

Specifying the ImageMagick Path When Installing Omeka S on Sakura Rental Server

Overview When installing Omeka S on Sakura Rental Server, it was necessary to specify the ImageMagick path. Modify the configuration file as follows. <?php return [ 'logger' => [ 'log' => false, 'priority' => \Laminas\Log\Logger::NOTICE, ], 'http_client' => [ 'sslcapath' => null, 'sslcafile' => null, ], 'cli' => [ 'phpcli_path' => null, ], 'thumbnails' => [ 'types' => [ 'large' => ['constraint' => 800], 'medium' => ['constraint' => 200], 'square' => ['constraint' => 200], ], 'thumbnailer_options' => [ 'imagemagick_dir' => '/usr/local/bin', # Modify this line ], ], 'translator' => [ 'locale' => 'en_US', ], 'service_manager' => [ 'aliases' => [ 'Omeka\File\Store' => 'Omeka\File\Store\Local', 'Omeka\File\Thumbnailer' => 'Omeka\File\Thumbnailer\ImageMagick', ], ], ];

May 30, 2023 · 1 min · Nakamura

Integrating Strapi with Amazon OpenSearch

Overview The following article was helpful for integrating Strapi with Elasticsearch. https://punits.dev/blog/integrating-elasticsearch-with-strapi/ The source code is also publicly available. https://github.com/geeky-biz/strapi-integrate-elasticsearch Here, I will note some customizations made based on the above article, including integration with Amazon OpenSearch. The customized source code is available here: https://github.com/nakamura196/strapi-integrate-opensearch Modifications The article references indexing_type, but it needed to be changed to indexing_request_type. https://github.com/nakamura196/strapi-integrate-opensearch/blob/006c533d4d7882fc9779552db31a7b0e2ada5e57/elastic/cron-search-indexing.js#L16 Additionally, to use Amazon OpenSearch instead of Elasticsearch, the following libraries need to be installed. ...

May 26, 2023 · 1 min · Nakamura

Configuring Strapi's REST API

Overview This is a memo on some configuration settings for Strapi’s REST API. Changing the Search Result Limit The following documentation describes this. https://docs.strapi.io/dev-docs/api/rest/sort-pagination#pagination Specifically: The default and maximum values for pagination[limit] can be configured in the ./config/api.js file with the api.rest.defaultLimit and api.rest.maxLimit keys. module.exports = { rest: { defaultLimit: 25, maxLimit: 1000, // 100, withCount: true, }, }; Retrieving Items Including Those with Draft STATE By default, items with a Draft STATE could not be retrieved. The following article was helpful. ...

May 26, 2023 · 1 min · Nakamura

Creating PDF Files from IIIF Manifest Files

Overview I had the opportunity to create PDF files from IIIF manifest files. As a solution, I found the following repository, but was unable to get it working. https://github.com/jbaiter/pdiiif While the above repository uses JavaScript, this time I created a conversion tool using Python. Usage You can try it from the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/iiif2pdf.ipynb During the initial installation, img2pdf is installed, but due to PIL version dependencies, a “RESTART RUNTIME” button will appear. Please click it and then re-run the same cell. ...

May 26, 2023 · 1 min · Nakamura

How to Register IIIF Images as Media in Omeka S

Overview This article introduces how to register IIIF images as media in Omeka S. Images published on external IIIF image servers can be registered in Omeka S. The official manual describes this at the following page. https://omeka.org/s/docs/user-manual/content/items/#media Specific Method In the media registration screen of the item edit page, enter values as shown below. You need to enter a URL ending with /info.json. The following uses the National Diet Library’s Koui Genji Monogatari as an example. ...

May 15, 2023 · 1 min · Nakamura

Auth0 Provider and Strapi Tutorial

Overview I tried authenticating Strapi using Auth0. I was able to accomplish this by following the steps in the article below. https://strapi.io/blog/auth0-provider-and-strapi-tutorial-1 However, in the section specifying Allowed Callback URLs, I needed to change http://localhost:1337/connect/auth0/callback to http://localhost:1337/api/connect/auth0/callback. (Reference) GitHub Following the above steps as a reference, I was also able to successfully configure GitHub as a provider.

April 24, 2023 · 1 min · Nakamura

Fixing TypeError: array_keys()... in Drupal

The following error occurred in the graphql module. The website encountered an unexpected error. Please try again later. TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in array_keys() (line 40 of /bitnami/drupal/modules/contrib/graphql/graphql.install). I fixed the source code referring to the following article. https://www.drupal.org/project/google_tag/issues/3319621 Specifically, by rewriting as follows, the error was resolved. // $negotiation = $languageTypes->get('negotiation'); $negotiation = $languageTypes->get('negotiation') ?? []; This should be fixed in the latest version, but we hope this is helpful for anyone encountering a similar error. ...

April 24, 2023 · 1 min · Nakamura