[Omeka S Module Modification] IIIF Search Module

Overview IIIF Search is a module for Omeka S that adds a IIIF Search API for full-text search. https://github.com/symac/Omeka-S-module-IiifSearch This time, I modified the above module. A pull request has been submitted, but the modified module is available in the following repository. https://github.com/nakamura196/Omeka-S-module-IiifSearch Specifically, the minimum query string length was set to 1 character, but I made it configurable through a settings form. The default was set to 3 characters, which prevented searching with a single kanji character, so this modification was made. ...

November 24, 2022 · 2 min · Nakamura

[Omeka S Module Development] Adding Features to Sitemaps

In the following article, I introduced the “Sitemaps” module, which adds dynamic sitemap XML files for each site in Omeka S. I made a simple feature addition to the above module. Specifically, I added options to choose whether to include pages and itemsets in the sitemap XML. The forked repository is below. https://github.com/nakamura196/omeka-s-module-Sitemaps The changes can be reviewed at the following URL. https://github.com/nakamura196/omeka-s-module-Sitemaps/commit/03325f79e4e5b83c4ff7867fd37ed210fdf8eab2 I hope this serves as a useful reference for module modifications. ...

November 20, 2022 · 1 min · Nakamura

[Omeka S Module Introduction] Sitemaps

Overview This module adds dynamic sitemap XML files for each site in Omeka S. https://omeka.org/s/modules/Sitemaps/ Installation It can be installed using the standard Omeka S method. Configuration First, select the site where you want to add a sitemap. Then navigate to Site Admin > Settings as shown below. At the bottom of the settings screen, there is an option to enable dynamic sitemap generation as shown below. When enabled, a sitemap is generated as shown below. ...

November 20, 2022 · 1 min · Nakamura

Omeka S Module Introduction: Data Type RDF

Overview Data Type RDF is a module that adds data types (html, xml, boolean) to Omeka S. Its usage is similar to Numeric Data Types: https://nakamura196.hatenablog.com/entry/2021/08/01/070701 Below is an introduction to how to use it. Usage Installation Install it the same way as other Omeka modules. Editing Resource Templates Create a resource template. Next, select the Data Type RDF values for the data type of a specific property. Here, we add all three types provided by this module. ...

November 14, 2022 · 1 min · Nakamura

Registering ICA RiC-O Vocabulary in Omeka S

Overview I registered the ICA RiC-O vocabulary in Omeka S, so this is a memo of the process. https://www.ica.org/standards/RiC/RiC-O_v0-2.html Method On the Omeka S vocabulary registration screen, enter the information as follows. As a result, 106 classes and 485 properties were registered. Below is an example of the property list screen, where you can also check the comments for each property. Summary I hope this serves as a useful reference for utilizing ICA RiC-O and Omeka S. ...

November 10, 2022 · 1 min · Nakamura

A Python Package for Interacting with the Omeka S REST API

Overview A package has been developed that allows you to operate the Omeka S REST API from Python. https://github.com/wragge/omeka_s_tools Furthermore, based on the above repository, I have created a repository with several additional features. https://github.com/nakamura196/omeka_s_tools2 In this article, I will introduce this repository. Usage Please refer to the following page. https://nakamura196.github.io/omeka_s_tools2/ This repository was developed using nbdev, which allows package development and documentation to proceed in parallel, and I found it to be a very convenient system. ...

November 7, 2022 · 2 min · Nakamura

[Omeka S Module Introduction] Custom Vocab

Overview I introduce Custom Vocab, one of the Omeka S modules. https://omeka.org/s/modules/CustomVocab Below is my translation of the description from the official site. The Custom Vocab module allows you to create controlled vocabularies and add them to specific properties in resource templates. When using that template for items, properties are loaded as dropdown menus limited to the controlled vocabulary options, instead of text input boxes. For example, you can create an institution-specific list of locations corresponding to various collections on campus, or a controlled list of people or places related to holdings. This can reduce typos and name variations, and provide metadata references for more fields. ...

November 6, 2022 · 3 min · Nakamura

Retrieving Birth and Death Years of Historical Figures from Wikidata

I created a notebook for retrieving birth and death years of historical figures from Wikidata. I hope this serves as a helpful reference. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/Wikidataから人物の生没年を取得する.ipynb

October 27, 2022 · 1 min · Nakamura

Script for Initial Setup of Omeka Classic on Amazon Lightsail

I created a script for the initial setup of Omeka Classic on Amazon Lightsail. This is the “Omeka Classic version” of the following article. I hope this serves as a helpful reference when using Omeka Classic with Amazon Lightsail. # Variables OMEKA_PATH=/home/bitnami/htdocs/omeka ## Do not include hyphens DBNAME=omeka VERSION=3.0.3 ############# set -e mkdir -p $OMEKA_PATH # Download Omeka wget https://github.com/omeka/Omeka/releases/download/v$VERSION/omeka-$VERSION.zip unzip -q omeka-$VERSION.zip mv omeka-$VERSION/* $OMEKA_PATH # Move .htaccess mv omeka-$VERSION/.htaccess $OMEKA_PATH # Remove unnecessary folders rm -rf omeka-$VERSION rm omeka-$VERSION.zip # Remove existing index.html (if it exists) if [ -e $OMEKA_PATH/index.html ]; then rm $OMEKA_PATH/index.html fi # Create database cat <<EOF > sql.cnf [client] user = root password = $(cat /home/bitnami/bitnami_application_password) host = localhost EOF mysql --defaults-extra-file=sql.cnf -e "create database $DBNAME"; # Omeka S configuration cat <<EOF > $OMEKA_PATH/db.ini [database] host = localhost username = root password = $(cat bitnami_application_password) dbname = $DBNAME prefix = "omeka_" charset = "utf8" EOF sudo chown -R daemon:daemon $OMEKA_PATH/files sudo apt install imagemagick -y

October 13, 2022 · 1 min · Nakamura

Double-Sided Ruby Annotations Using python-docx

This is a memo on how to achieve double-sided ruby (furigana) in Word using python-docx. You can try it from the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/python_docxを用いた両側ルビ.ipynb An output example is shown below. An input example is shown below. <body> <p> 私は <ruby> <rb> <ruby> <rb>打</rb> <rt place="right">ダ</rt> </ruby> <ruby> <rb>球</rb> <rt place="right">キウ</rt> </ruby> 場 </rb> <rt place="left">ビリヤード</rt> </ruby> に行きました。 </p> <p> <ruby> <rb>入学試験</rb> <rt place="above">にゅうがくしけん</rt> </ruby> があります。 </p> </body> The program is still incomplete, but I hope it serves as a helpful reference. ...

October 4, 2022 · 1 min · Nakamura

Converting TEI/XML Files to EPUB Using Python

Overview I had the opportunity to convert TEI/XML files to EPUB using Python, so here are my notes. While Oxygen XML Editor is one method for converting TEI/XML files to EPUB, this time I used the Python library “EbookLib.” I referenced the following article. https://dev.classmethod.jp/articles/try-create-epub-by-python-ebooklib/ In particular, this time the goal is to create a vertical-text EPUB from the TEI/XML files published in the “Koui Genji Monogatari Text Data Repository.” ...

September 30, 2022 · 1 min · Nakamura

[Omeka S Module Development] Updating IIIF Viewers

Overview I made feature improvements to the Omeka S module “IIIF Viewers,” which configures IIIF manifest icons and multiple IIIF-compatible viewers. https://github.com/omeka-j/Omeka-S-module-IiifViewers Along with these improvements, version 1.1.0 has been released. https://github.com/omeka-j/Omeka-S-module-IiifViewers/releases/tag/1.1.0 For the release, the method described in the following article was used. The specific improvements are described below. Fixing IIIF Manifest Icon URLs As mentioned in the following article, there was a bug where the IIIF manifest icon could not be loaded into other viewers via drag and drop. This improvement fixes that bug. ...

September 26, 2022 · 2 min · Nakamura

Creating a GitHub Release Script for Omeka S Module Development

I created a GitHub release script for Omeka S module development. For this development, I referenced the GitHub repository usage of Daniel-KM, who has developed numerous Omeka S modules. Specifically, GitHub repositories are created with the naming convention “Omeka-S-module-{module name}”. Example: https://github.com/Daniel-KM/Omeka-S-module-EasyInstall For releases, they are tagged with “{module name}-{version}” and a file named “{module name}-{version}.zip” is attached. Example: https://github.com/Daniel-KM/Omeka-S-module-EasyInstall/releases/tag/3.3.6 When this zip file is extracted, a folder named “{module name}” is created. This is necessary because Omeka S requires the module folder name to match the module name. ...

September 22, 2022 · 1 min · Nakamura

How to Extract and Process Only Text Strings from XML Files

I had the opportunity to extract and process only text strings from XML files. For this need, I was able to achieve it with the following script. soup = BeautifulSoup(open(path,'r'), "xml") elements = soup.findChildren(text=True, recursive=True) The key point is passing text=True, which allows you to retrieve only text nodes. I hope this serves as a useful reference.

September 22, 2022 · 1 min · Nakamura

I Created an API That Returns a List of Items Containing a Specified IIIF Manifest in Cultural Japan

I created an API that returns a list of items containing a specified IIIF manifest in Cultural Japan. The API documentation is available at the following link. https://petstore.swagger.io/?url=https://api.cultural.jp/v3/api-docs Here is an example request. https://api.cultural.jp/v3/items/urls?manifest=https://iiif.harvardartmuseums.org/manifests/object/215190 For the API development, I used express-openapi and deployed it using AWS Lambda, referencing the following article. https://www.forcia.com/blog/002471.html I hope this serves as a useful reference for utilizing Cultural Japan.

September 20, 2022 · 1 min · Nakamura

Batch Download Script for Omeka S Modules

I have created a script to batch download the modules I frequently use in Omeka S. I plan to update it gradually. I hope this serves as a helpful reference. # Module ## CustomOntology version=3.3.5.1 name=CustomOntology wget https://github.com/Daniel-KM/Omeka-S-module-$name/releases/download/$version/$name-$version.zip unzip $name-$version.zip rm $name-$version.zip ## IIIF Server version=3.6.6.7 name=IiifServer wget https://github.com/Daniel-KM/Omeka-S-module-$name/releases/download/$version/$name-$version.zip unzip $name-$version.zip rm $name-$version.zip ## Universal Viewer version=3.6.4.5 name=UniversalViewer wget https://github.com/Daniel-KM/Omeka-S-module-$name/releases/download/$version/$name-$version.zip unzip $name-$version.zip rm $name-$version.zip ## iiif viewers wget https://github.com/omeka-j/Omeka-S-module-IiifViewers/releases/download/1.1.0/IiifViewers-1.1.0.zip unzip IiifViewers-1.1.0.zip rm IiifViewers-1.1.0.zip ## easy admin wget https://github.com/Daniel-KM/Omeka-S-module-EasyAdmin/releases/download/3.3.7/EasyAdmin-3.3.7.zip unzip EasyAdmin-3.3.7.zip rm EasyAdmin-3.3.7.zip

September 14, 2022 · 1 min · Nakamura

Omeka S Theme Development: Fixed a Bug in the Bootstrap 5 Omeka S Theme

I have published a Bootstrap 5-based Omeka S theme at the following link. https://github.com/ldasjp8/Omeka-S-theme-Bootstrap5 How to use this theme is introduced in the following article. As noted in the above article, there had been a bug with the display style option. This bug has been fixed in the following commit. https://github.com/ldasjp8/Omeka-S-theme-Bootstrap5/commit/3b456277fe4f75cdcc0044a0fe0df7e7e2e14156 I hope this is helpful for those using this theme.

September 12, 2022 · 1 min · Nakamura

Script for Initial Setup of Omeka S on Amazon Lightsail

I created a script for the initial setup of Omeka S on Amazon Lightsail. I hope this serves as a useful reference when using Omeka S with Amazon Lightsail. # 変数 OMEKA_PATH=/home/bitnami/htdocs/omeka-s ## ハイフンは含めない DBNAME=omeka_s VERSION=3.2.3 ############# set -e mkdir $OMEKA_PATH # Omekaのダウンロード wget https://github.com/omeka/omeka-s/releases/download/v$VERSION/omeka-s-$VERSION.zip unzip -q omeka-s-$VERSION.zip mv omeka-s/* $OMEKA_PATH # .htaccessの移動 mv omeka-s/.htaccess $OMEKA_PATH # 不要なフォルダの削除 rm -rf omeka-s rm omeka-s-$VERSION.zip # 元からあったindex.htmlを削除(もし存在すれば) if [ -e $OMEKA_PATH/index.html ]; then rm $OMEKA_PATH/index.html fi # データベースの作成 cat <<EOF > sql.cnf [client] user = root password = $(cat /home/bitnami/bitnami_application_password) host = localhost EOF mysql --defaults-extra-file=sql.cnf -e "create database $DBNAME"; # Omeka Sの設定 cat <<EOF > $OMEKA_PATH/config/database.ini user = root password = $(cat bitnami_application_password) dbname = $DBNAME host = localhost EOF sudo chown -R daemon:daemon $OMEKA_PATH/files sudo apt install imagemagick -y

September 9, 2022 · 1 min · Nakamura

[Omeka S] Created a Foundation S Theme That Works Around the Japanese Search Bug

As summarized in the following article, there are some issues with full-text search in Japanese in Omeka S with the default settings. https://nakamura196.hatenablog.com/entry/2022/03/07/083004 In the above article, I introduced “Workaround 2” as a simple solution to this issue. This time, I created a repository that applies this workaround to “Foundation S,” one of the themes for Omeka S. https://github.com/nakamura196/foundation-s I hope this is helpful for those using the “Foundation S” theme who are experiencing issues with Japanese search. ...

August 26, 2022 · 1 min · Nakamura

[Memo] How to Use Virtuoso

This is a memo on how to use Virtuoso, an RDF store. Checking Registered Graph URIs Conductor > Linked Data > Graphs > Graphs Manually Uploading RDF Files Conductor > Linked Data > Quad Store Upload Enabling Federated Query The following article was helpful. The “Account Roles” configuration was required. https://community.openlinksw.com/t/enabling-sparql-1-1-federated-query-processing-in-virtuoso/2477 I hope this serves as a helpful reference.

August 19, 2022 · 1 min · Nakamura