Prototyping a TEI/XML File Editing Environment Using LEAF Writer and GakuNin RDM

Overview This is a memo about prototyping a TEI/XML file editing environment using LEAF Writer and GakuNin RDM. References The following article introduced how to use LEAF Writer from Next.js. In particular, the following npm package is used. https://www.npmjs.com/package/@cwrc/leafwriter For the input/output of TEI/XML files to be edited above, GakuNin RDM is used. The following article may also be helpful regarding how to use the GakuNin RDM API from JavaScript. ...

March 21, 2025 · 6 min · Nakamura

Using Filters with the GakuNin RDM (OSF) API

Overview This is a memo on how to use filters with the GakuNin RDM (OSF) API. Target Data We target “NII Storage” with the following file structure. Via the API, we target data accessible at URLs like the following. https://api.rdm.nii.ac.jp/v2/nodes/wzv9g/files/osfstorage/ An example of the JSON data is shown below. { } " ] " } d { } { } { } , l " " " " " } a " " " } " } " } , " " " } " } " } , " " " } " } " } i f l p n m " " t i t a " " " " " " " " " " " " } " " " , r " } " } " } " } " } " } , l " " " " " " " " i t a " " " " " " " " " " " " } " " " , r " } " } " } " } " } " } , l " " " " " " " " i t a " " " " " " " " " " " " } " " " , r " } " } " } " } , l " " " " " " n i a r e e t p a d y t g c n k p s p m l d d e " } " , t c c e p " } " } , v " } , c " } , m " } , n " } " } , t " } " } i i m u d d r h s d y t g c n k p s p m l d d e " } " , t c c e p " } " } , v " } , c " } , m " } , n " } " } , t " } " } i i m u d d r h s d y t g c n k p s p m l d d e " } , t c c e p " } " } , f " } , n " } " } , t " } " } i i m u d n s k r s e x t o e " " p t u h a i a i r a a a a x h " " , d a u u l a l " } , d " " e l " } o l " } e l " } o l " } , d " " a l " } , d " " n n o p e o e t e " p t u h a i a i r a a a a x h " " , d a u u l a l " } , d " " e l " } o l " } e l " } o l " } , d " " a l " } , d " " n n o p e o e t e " p t u h a i a i r a a a a x h " " a u u l a l " } , d " " i l " } o l " } , d " " a l " } , d " " n n o p e e e s s t v t a t r : : e r i e m n t z o t s t t t a m s o g r r a r i r " " a i t r i r " " m i r " " t i r " " d i r " " a i t r i r " " } a t i k f v l l w n m l : e r i e m n t z o t s t t t a m s o g r r a r i r " " a i t r i r " " m i r " " t i r " " d i r " " a i t r i r " " } a t i k f v l l w n m l : e r i e m n t z o t s t t t a m s g r r a r i r " " a i t l i r " " d i r " " a i t r i r " " } a t i k f v l l w l " t " " " " a _ " i d c e d h e v e t e e r s d h w s r r t e n e h m t d y s n e h m m n e h m a n e h m e n e h m t d y g n e h m " t y d s o e o e n d l f " i d c e d h e v e t e e r s d h w s r r t e n e h m t d y s n e h m m n e h m a n e h m e n e h m t d y g n e h m " t y d s o e o e n d l f " i d c e d h e v e t e e r s d h s r r t e n e h m t d y e n e h m e n e h m t d y g n e h m " t y d s o e o e _ f : " : : : : l p [ " : b " k " " " " i r _ _ _ a h 5 a n " e e i n k l r e a " p i k l r e e k l r e d k l r e " k l r e a " p e k l r e t a p " " " " a t l e " " " : b " k " " " " i r _ _ _ a h 5 a n " e e i n k l r e a " p i k l r e e k l r e d k l r e " k l r e a " p e k l r e t a p " " " " a t l e " " " : b " k " " " " i r _ _ _ a h 5 a " e e i n k l r e a " p s k l r e " k l r e a " p e k l r e t a p " " " " a t f " : " a 6 u : o : : : : d i t m c " e " 2 l : n n o t s a e t " : e o s a e t n s a e t a s a e t : s a e t " : e t s a e t y " e : : : : d e o r : : 6 u : o : : : : d i t m c " e " 2 l : n n o t s a e t " : e o s a e t n s a e t a s a e t : s a e t " : e t s a e t y " e : : : : d e o r : : 6 u : o : : : : d i t m c " e " 2 : n n o t s a e t " : e " s a e t : s a e t " : e t s a e t y " e : : : : d e o : { n n n { : g 7 " t u e a o o r : s : 5 o t t n _ " t f a : " n " t f a t " t f a t " t f a " t f a : " " " t f a p : " " " a " 7 " t u e a o o r : s : 5 o t t n _ " t f a : " n " t f a t " t f a t " t f a " t f a : " " " t f a p : " " " a " 7 " t u e a o o r : s : 5 t t n _ " t f a : " : " t f a " t f a : " " " t f a p : " " " l n u u u e c f e " t " " " 9 r l u d e " 6 a [ _ _ s f : e " " " : s : e " " s : e " " a : e " " { : e " " " : : : e " " e : " { " " : : d : " " d f e " t " " " 7 r l u d e " 6 a [ _ _ s f : e " " " : s : e " " s : e " " a : e " " { : e " " " : : : e " " e : " { " " : : d : " " d f e n t " " " n r l u d e " 6 [ _ _ s f : e " " " : : e " " { : e " " " : : : e " " e : " { " " : : d " u l l l 3 " e i s u " I f / 5 " i c i a { : " " d ] u v h o d : : { 6 " d : : " d : : _ d : : d : : { w d : : " { w h h " h h a i s b " 0 f / 9 " i c i a { : " " d ] u v h o d : : { 6 " d : : " d : : _ d : : d : : { w d : : " { w h h " h h a i s u " t f u " i c i a { : n " ] u v h o d : : { 6 { d : : d : : { w d : : " { w h h e h l l l l , : 5 l " n : M i 6 2 : z h f t e : s , s e i l { " 7 " : { " : { " r { " { " z " { { " : " z t t " " : " t t 8 l " 4 : 1 i 6 3 : z h f t a : s , s e i l { " 7 " : { " : { " r { " { " z " { { " : " z t t " " : " t t c l " l : e 6 l : z h f t u : , s e i l { " 7 " { " { " z " { { " : " z t t " " r t l , , , b e : g G l 7 1 e e i e { 5 " e r p d : " { 4 f : " { : " { e : " { : " { v n : " { n v t t h h h t t 4 e : 5 . l 7 9 e e i e { 3 " e r p d : " { 4 f : " { : " { e : " { : " { v n : " { n v t t h h h t t a e : l s l 7 l e e i e { l e r p d : " { 4 f : " { : " { v n : " { n v t t h h " t , 1 0 s d n _ e c 0 " d d e d 7 " : r s s e h } 0 i { h } { h } c h } h } 9 o h " o 9 p p t t " t p p 7 s m n x e d 7 " d d e d 8 " : r s s e h } 0 i { h } { h } c h } h } 9 o h " o 9 p p t t " t p p 9 s , n t d d , " d d e d l n r s s e h } 0 i h } h } 9 o h " o 9 p p t t : p 0 b " { 3 u 8 " e 7 o _ " d " 1 5 _ i " r { t 3 l { t { t o { t { t g d { t n d g s s t t h t s s 4 " { p u m " a , o _ " d " 2 8 _ i " r { t 3 l { t { t o { t { t g d { t n d g s s t t h t s s 9 " { u " e a o _ " d " , u _ i " r { t 3 l { t { t g d { t n d g s s t t s 2 , " l 2 , 5 , s p : " : 9 e 0 c o : " t 4 e t t r t t " e t o e " : : p p t p : : 1 , " l l , 8 s p : " : 4 3 0 c o : " t 4 e t t r t t " e t o e " : : p p t p : : 1 , l , r c s p : " : l c o : " t 4 e t t " e t o e " : : p p " : f , l 6 b f a : 2 2 a n : p a s p p d p p , s p d " / s s t s / 6 , l " 4 f a : b d a n : p a s p p d p p , s p d " / s s t s / 6 l " a f a : l a n : p a s p p , s p d " / s s h / e , 9 0 s t n " b 8 n " { s 4 " s s s s s " s e , / : : p : / 0 , , 7 s t n " 2 1 n " { s 4 " s s s s s " s e , / : : p : / 0 , , 9 s t n n n " { s 4 " s s " s e , / : : t / 4 . b t h u " 2 3 2 _ : { : 8 : : " : : : " a f / s r a 0 4 t h u " 2 f 8 _ : { : 8 : : " : : : " a f / s r a 0 9 t h u n u _ : { : 8 : : : " a f / t a 7 p 2 o " l 2 0 0 1 c / 3 / / : / / / p i / : d p 0 1 o " l 2 0 4 a c / 3 / / : / / / p i / : d p 0 1 o " l u l c / 3 / / / p i / p p 4 n f r : l 0 2 1 8 o 1 / b / / / / / i l f f m m i 9 6 r : l 0 2 9 6 o 5 / b / / / / / i l f f m m i 9 6 r : l l l o 1 / b / / / i l f f s i 0 g e a , 2 5 0 7 m a d a a { a a a . e i i / f . . 0 0 a , 2 5 4 e m a d a a { a a a . e i i / f . . 0 0 a , l , m a d a a a . e i i : . 0 " 4 g " 5 - 3 0 m p c p p p p p r s l l r r n r 0 0 g " 5 - 7 5 m p c p p p p p r s l l r r n r 0 0 g " , m p c p p p r s l l r 1 , 7 e / - 0 a 6 e i 2 i i i i i d . e e d . i d 1 0 e / - 0 1 2 e i 2 i i i i i d . e e d . i d 1 0 e / e i 2 i i i d . e e / d 0 4 " I 0 3 7 7 n . 0 . . . . . m r s s m r i m 0 9 " 0 0 3 8 a n . 0 . . . . . m r s s m r i m 0 9 " t n . 0 . . . m r s s f m f 0 , M 3 - e a t r 0 r r r r r . d . . . d . . 9 0 , 1 3 - 4 5 t r 0 r r r r r . d . . . d . . 9 0 , e t r 0 r r r . d . . i . 7 0 G - 1 9 5 " d 1 d d d d d n m r r n m a n e 0 . - 1 2 2 " d 1 d d d d d n m r r n m a n e 0 s " d 1 d d d n m r r l n 5 1 _ 1 0 9 3 : m 0 m m m m m i . d d i . c i 0 1 x 1 9 d 5 : m 0 m m m m m i . d d i . c i 1 1 t : m 0 m m m i . d d e i 3 0 8 0 T 5 a . 8 . . . . . i n m m i n . i 4 0 m 9 T 1 9 . 8 . . . . . i n m m i n . i d 0 / . 8 . . . i n m m s i c f 2 T 0 5 a t n b n n n n n . i . . . i j . 5 9 l T 0 0 7 t n b n n n n n . i . . . i j . 9 9 " t n b n n n . i . . . . 0 7 6 0 3 9 a r i 8 i i i i i a i n n a i p a 4 e " 1 8 4 e r i 8 i i i i i a i n n a i p a 8 e , r i 8 i i i a i n n r a " 5 9 3 : 7 b u i a i i i i i c . i i c . / c " 0 , 3 : 6 b u i a i i i i i c . i i c . / c " 1 u i a i i i c . i i d c , 3 . : 2 c 0 e . 9 . . . . . . a i i . a w . , 4 : 4 a a e . 9 . . . . . . a i i . a w . , d e . 9 . . . . a i i m . c p 2 2 e f , a 5 a a a a a j c . . j c z j 5 2 6 2 c , a 5 a a a a a j c . . j c z j 9 , a 5 a a a j c . . . j 0 n 2 : a 1 c " c c c c c p . a a p . v p 4 4 : a 6 c " c c c c c p . a a p . v p 8 c " c c c p . a a n p " g : 5 e f . , . . . . . j c c j 9 / " : 4 b f . , . . . . . j c c j 9 / / . , . . . j c c i / , " 5 1 a 0 j j j j j j v p . . d p g , 2 4 e a j j j j j j v p . . d p g " j j j j v p . . i v , 1 . 3 0 p p p p p p 2 j j o / / 2 7 . 6 1 p p p p p p 2 j j o / / 2 , p p p p 2 j j . 2 . 7 9 d / / / / / / v p p w r f / . 6 2 e / / / / / / v p p w r f / / / / / v p p a / 7 5 c a v v v v v v f 1 / n e i f 8 3 3 b v v v v v v f 1 / n e i f v v v v f 1 / c f 5 0 b a 2 2 2 2 2 2 i v l n l i 6 6 2 8 2 2 2 2 2 2 i v l n l i 2 2 2 2 i v . i 0 5 b e / / / / / / l r 1 1 d e l 8 1 8 a / / / / / / l r 1 1 d e l / / / / l r 1 1 j l 5 5 f f f f n f n n e e / a e s e 0 0 4 1 f f n f n n e e / a e s e f n n n e e / / p e 5 0 " b i i o i o o s s r r d r / s 7 7 " 3 i i o i o o s s r r d r / s i o o o s s r r / s 0 Z , 9 l l d l d d / o e e / ? o / 8 Z , 7 l l d l d d / o e e / ? o / l d d d / o e e v / Z " 5 e e e e e e 6 u s s u u s 6 Z " e e e e e e e 6 u s s b u s 6 e e e e 6 u s s 1 6 " , 1 s s s s s s 7 r o o n r f 7 " , d s s s s s s 7 r o o 4 r f 7 s s s s 7 r o o / 7 , 9 / / / / / / c c u u g l s c , 6 / / / / / / d c u u 5 l s d / / / / d c u u r d d 6 6 w 6 w w e e r r d = t e e 6 6 w 6 w w a e r r m = t a 6 w w w a e r r e a 6 7 7 z 7 z z 5 s c c 3 h o 5 1 7 7 z 7 z z 8 s c c p h o 8 7 z z z c s c c s c 0 4 c v c v v b / e e / t r b e 4 d v d v v 4 / e e / t r 4 4 v v v a / e e o a b 0 e 9 e 9 9 0 w s s " t a 0 6 0 a 9 a 9 9 7 w s s " t a 7 0 9 9 9 9 w s s u 9 0 3 5 g 5 g g b z / / , p g b 4 3 8 g 8 g g 4 z / / , p g 4 3 g g g 9 z / / r 9 6 4 b / b / / 2 w w s e 2 b 4 4 / 4 / / 1 w w s e 1 4 / / / 1 w w c 1 4 a 0 c 0 ? " f 9 z z : f 9 a 7 c 7 ? " 6 9 z z : 6 a f ? " 6 9 z z e 6 8 4 b o b f , e g v 6 e c 4 4 o 4 f , 0 g v 6 0 4 i f , 0 g v s 0 3 8 2 m 2 o 4 / 9 9 / 7 4 0 8 1 m 1 o 0 / 9 9 / 7 0 8 l o 0 / 9 9 / 0 1 3 f m f r 7 p g g r c 7 e 3 6 m 6 r 0 p g g r d 0 3 e r 0 p g g w 0 4 b e e e m 4 r / d e 4 2 b 0 e 0 m 9 r / d a 9 b s m 9 r / z 9 0 d 4 n 4 a 0 p p m 5 0 c d 0 n 0 a 0 p p m 8 0 d / a 0 p p v 0 3 c 7 t 7 t 0 v r r . b 0 1 c 0 t 0 t 0 v r r . 4 0 c o t 0 v r r 9 0 e 2 4 s 4 = 1 i o o n 0 1 a 2 9 s 9 = 1 i o o n 7 1 2 s = 1 i o o g 1 6 0 0 / 0 j 0 d v v i b 0 0 0 0 / 0 j 0 d v v i 4 0 0 f j 0 d v v / 0 7 0 0 ? 0 s f e i i i 2 f b 0 0 ? 0 s 9 e i i i 1 9 0 s s 9 e i i p 9 1 1 1 f 1 o 7 r d d . f 7 4 1 1 f 1 o e r d d . 6 e 1 t o e r d d r e 6 0 0 o 0 n 5 s e e a e 5 9 0 0 o 0 n 0 s e e a 0 0 0 o n 1 s e e o 1 6 8 f r f " 3 / r r c 4 3 c 8 9 r 9 " 4 / r r c 0 4 8 r " d / r r v d 2 b 7 m 7 , c o s s . 7 c f b e m e , 5 o s s . 0 5 b a , 9 o s s i 9 c 8 5 a 5 0 s / j 4 0 7 8 0 a 0 4 s / j 9 4 8 g 8 s / d 8 f a 3 t 3 / f o p 0 / 4 a 4 t 4 / f o p 0 / a e / f o e / b 9 c = c " s s s / 0 " 6 9 5 = 5 " s s s / 0 " 9 / " s s s r " c 5 0 j 0 , t f f d 1 a 5 4 j 4 , t f f d 1 5 6 , t f f s f / / s / o s s o 0 7 / / s / o s s o 0 / 7 o s s / 6 ? v o m r t t w f 7 ? v o m r t t w 9 ? d r t t o f f e n e a o o n 7 7 f e n e a o o n e f a a o o s 4 o r & t g r r l 5 d o r & t g r r l 0 o c g r r f 1 r s f a e a a o 3 0 r s f a e a a o 4 r a e a a s f m i i d / g g a c a m i i d / g g a 5 m 9 / g g t " a o l a 6 e e d 0 " a o l a 6 e e d 4 a 9 6 e e t n t t 7 / / / " t n t t 7 / / / " t 1 7 / r = s e a c 6 6 u , = s e a d 6 6 b , = 6 d 6 6 a j / r _ e 7 7 n j / r _ a 7 7 4 j 0 a 7 7 g s ? % r 5 c c g s ? % r 8 d d 5 s 0 c d d e o f 5 e b e e d o f 5 e 4 a a m o 0 a a a / n o B c 0 5 5 3 n o B c 7 8 8 p n 9 9 c c 6 " r t o b b b / " r t o 4 4 4 / " 0 9 a a 7 , m a r 2 0 0 ? , m a r 1 7 7 ? , 0 1 9 9 d a r d f b b d a r d 6 4 4 d 1 6 9 9 a t g s e 2 2 i t g s 0 1 1 i 0 0 1 1 c = e / 4 f f r = e / 0 6 6 r 9 0 6 6 a j t ? 7 e e e j t ? 0 0 0 e e 0 0 0 9 s % f 4 4 4 c s % f 9 0 0 c 1 9 0 0 9 o 5 o 0 7 7 t o 5 o 0 0 0 t d 0 0 0 1 n D r 0 4 4 % n D r 0 9 9 % 9 0 9 9 6 " = m 1 0 0 2 " = m 1 0 0 2 8 1 0 0 0 , u a 0 0 0 6 , b a 0 0 0 6 / 0 0 0 0 n t f 1 1 m 4 t 9 1 1 m ? 9 1 1 0 g = 7 0 0 o 5 = e 0 0 o f e 0 0 9 d j 5 f f d m j 0 9 9 d o 1 9 9 0 3 s 3 7 7 e p s 4 e e e r d e e 0 " o c 5 5 = " o 5 0 0 = m 9 1 1 1 , n 0 3 3 r , n 4 4 4 r a 8 d d 0 " " c c e " " 5 5 e t / 9 9 9 , , 0 0 n , , 4 4 n = " 8 8 e " " d " " d j , / / 1 , , e , , e s " " d r r o , , 9 " " n 8 , , " / , ? k i n d = f o l d e r " , Search Examples Since it conforms to JSON:API, the filter parameter is used. ...

March 19, 2025 · 40 min · Nakamura

Nuxt Content: Addressing 'Cannot find name queryContent'

Overview This is a memo on how to address the error “Cannot find name ‘queryContent’.” that occurred in Nuxt Content. Cause It appears that Nuxt Content v3 was released on 2025/1/16. https://content.nuxt.com/blog/v3 As a result, queryContent has been changed to queryCollection and similar. Solution As described in the following, it appears necessary to create a content.config.ts file and change to using queryCollection and similar. https://content.nuxt.com/blog/v3#️-content-collections By applying the above changes, the error was resolved. ...

March 19, 2025 · 1 min · Nakamura

Using Route 53 DNS Records with Sakura Rental Server (Shared SSL)

Overview This is a memo on using DNS records configured in AWS Route 53 with Sakura Rental Server. Additionally, we use free SSL with Let’s Encrypt. Sakura Rental Server Go to Domain/SSL and click the “Add New Domain” button. Click the “Add” button under “Use a domain acquired from another provider without transferring” at the bottom of the screen. Enter the custom domain and click the “Add” button. In the following example, “aaa.example.org” is used. ...

March 18, 2025 · 1 min · Nakamura

A Sample App Displaying Images with Mirador and Text with CETEIcean

Overview I created a sample app that loads TEI/XML files, displays images with Mirador, and displays text with CETEIcean. You can try it from the following URL. Demo Site https://nakamura196.github.io/ceteicean-mirador/ Background I have previously developed applications that provide similar functionality. Implementation example using Next.js Implementation example using XSLT This time, I introduce an approach using only HTML and plain JavaScript. Target Data The target is the following Koui Genji Monogatari Text DB. ...

March 14, 2025 · 7 min · Nakamura

Registering Objects Using the AtoM (Access to Memory) API

Overview This is a memo on how to register objects using the AtoM (Access to Memory) API. Enabling the API Access the following. /sfPluginAdminPlugin/plugins Enable arRestApiPlugin. Obtaining an API Key The following explains how to generate an API key. https://www.accesstomemory.org/en/docs/2.9/dev-manual/api/api-intro/#generating-an-api-key-for-a-user While it appears you can also connect to the API with a username and password, this time I issued a REST API Key. Endpoints AtoM provides multiple menus such as “Authority records” and “Functions,” but it appears that only the following are available via the API. ...

March 12, 2025 · 19 min · Nakamura

Running AtoM (Access to Memory) with Docker

Overview I had the opportunity to run AtoM (Access to Memory) with Docker, so here are my notes. Manual The documentation is available at the following link. https://www.accesstomemory.org/es/docs/2.9/dev-manual/env/compose/ g c e d i d x o t p c a o k c t r e l o t r o m n C c e O o M m - P p b O o S s q E e a _ / F u 2 I p . L x E - = d h " t $ t P p W s D : / / d / o g c i k t e h r u / b d . o c c o k m e / r a r c t o e m f p a o c s t e u . a d l e / v a . t y o m m l . " g i t a t o m Then, run the following. ...

March 12, 2025 · 2 min · Nakamura

Cases Where ImageMagick May Not Work Properly for Creating Pyramidal TIFFs?

Overview I investigated cases where ImageMagick does not work properly when creating pyramidal TIFFs for IIIF image delivery. References Conversion methods are explained on pages like the following. https://samvera.github.io/serverless-iiif/docs/source-images#creating-tiled-tiffs Using the VIPS command line # v # v i i F p F p & & o s o s & & r r t e v r a i a x i m f t p 3 f s r s t - s o a e c a u c t m h v r t i p a e c _ f _ n e b f i n s a s m e o i n a a l u m d v g r a e e s c g s . o e e o t v u _ u e r i w r m c m i c p e a t e _ g h _ i i e i m m . a m a a t n a g g i g e e f a e . l . v o p t u h i o t a f u p t u c t p t h e u _ a m t i n p _ m n _ i a e i m g l m a e a g . g e t e . i . t f v i f 0 - t - i - t l n i e l 3 e - \ p - y p r y a r m a i m d i d - c - o c m o p m r p e r s e s s i s o i n o n j p j e p g e g - t - i t l i e l - e w - i w d i t d h t h 2 5 2 6 5 6 - t - i t l i e l - e h - e h i e g i h g t h t 2 5 2 6 5 6 \ Using ImageMagick c o n - - - ' v d d c p e e e o t r f f m i t i i p f n n r : s e e e o o s u u t t s t r i i p c f f j u e f f p t _ : : e _ i t g g i m i e m a l n \ a g e e g e - r e . g a . t e t t i o e i f m - f e p ' - t y a r r l y a p = m h 2 i a 5 d 6 s o x = f 2 t f 5 r 6 u e Target Data The following image was used. ...

March 11, 2025 · 19 min · Nakamura

Serving IIIF Images Using mdx.jp Object Storage and IIP Image (IIIF Image Server)

Overview This is a note on my experiment with serving IIIF images using mdx.jp object storage and IIP Image (IIIF Image Server). This is a continuation of the following article. Docker Version of IIP Image A Docker image for the IIPImage server is available at the following link, so I will use that. https://hub.docker.com/r/iipsrv/iipsrv Refer to the following article and others for installing Docker. https://qiita.com/Marron-chan/items/570c7c7baaae3b4d6b11 Execution Following the previous article, mount the mdx.jp object storage as follows. ...

March 7, 2025 · 7 min · Nakamura

Investigating Partial Match Search with AND Conditions Across Fields in Algolia

This article was created by AI with some human edits. Introduction Among full-text search engines, Typesense, MeiliSearch, and Algolia are gaining attention as options for small-scale projects. However, whether partial match search with “field a contains x AND field b contains y” is possible is an important consideration for project requirements. This article examines the feasibility of partial match search in Algolia and compares it with Elasticsearch. Partial Match Search in Algolia Algolia offers full-text search (query), but there are limitations when performing partial match searches on specific fields. ...

March 3, 2025 · 3 min · Nakamura

How to Convert Word Files to TEI XML: A Guide to Using the TEIgarage API

This article was created by AI with some human modifications. Introduction In the world of digital humanities, it has become common to store documents in TEI (Text Encoding Initiative) format. TEI is a standard for structuring scholarly texts. This article explains how to convert documents created in Microsoft Word to TEI XML format using Python. What is TEIgarage? TEIgarage is an online service for converting documents in various formats to TEI XML. The service provides an API that can be called directly from programs. In this article, we will call this API from Python to convert Word files. ...

March 3, 2025 · 8 min · Nakamura

Developing a Viewer with Next.js + CETEIcean + React TEI Router

Overview This is a memo on developing a TEI/XML viewer combining Next.js, CETEIcean, and React TEI Router. Background CETEIcean is a JavaScript library that converts TEI/XML to HTML5. https://github.com/TEIC/CETEIcean React TEI Router is a library that enables structured display of TEI/XML using React components, based on CETEIcean. It is described as follows: https://github.com/pfefferniels/react-teirouter TEI for React using CETEIcean and routes By combining these, I created a viewer that can customize and display TEI/XML in Next.js. ...

March 2, 2025 · 11 min · Nakamura

Next.js for Drupal BASE_PATH Issue and Fix (Using patch-package)

Overview Next.js for Drupal v2.0.0 was released on 2025/2/11. https://next-drupal.org/ https://next-drupal.org/blog/next-drupal-2-0 When I tried it out, I found that the handling of BASE_PATH required attention, so this is a memo about it. Environment Variables The sample environment variables are as follows. # # N N # D D # D E E R R R S R X X A U U R U e e T T u P P e P e q _ _ t A A q A u P I h L L u L h i U M e _ _ i _ t r B A n C C r R t e L G t L L e E p d I E i I I d V s C _ c E E A : _ D a N N f L / D O t T T o I / R M i _ _ r D n U A o I S A e P I n D E O T x A N = C n E t L = R R - _ - _ s e E d S d B i t T e E r A t r = m C u S e i R a R p E . e e n E a _ e v t d T l U x e r = . R a i R R o L m t e e e r = p h v v t g h l i e a r / t e s l i d t . t i e o p c f h d v c s o r i a e s : m o s t / / m i t e / f o h n s / r n i v i a o s i t d m r e m f o . i / r n e n a o m x / d m e a c m n m o i / t p n n a - l f / d v e i c m a . g i r c n n i o s f / a m e i c b r g o l v / n e i s f s c e i e r g s / / i s c c e o e r n s v s / i u c c m o e e n s r s / u n m e e x r t When specifying NEXT_PUBLIC_DRUPAL_BASE_URL with a base path included, such as https://site.example.com/xxx, API requests were sent to https://site.example.com/jsonapi/, failing to correctly retrieve resources. ...

March 2, 2025 · 11 min · Nakamura

Registering Data with Drupal's JSON:API Using Username and Password

Overview In the past, I wrote articles about registering data using Drupal’s JSON:API with Python. The following uses Basic authentication. And the following uses an API Key. In addition to these methods, I was able to register data using regular login authentication, so this is a memo of that process. Code The code is as follows. It logs in, obtains a CSRF token, and then registers content. i i i f c m m m r l p p p o a o o o m s r r r s d d d d t t t d e e e e o A f f f f r j o t p e s s e i l # s # # # s s l # l l i g # c i e c # u r i e q o n C _ o e e e o o o f e s f l r r e f l u n v l i a D l エ s 認 l l g ロ g g t C r s e 記 l s s e i n d r f ン e 証 f f i グ i i l _ S f c e a 事 p r e s i e i _ u . ド l 情 . . n イ n n l j h o s c R _ f c s # # s } : # s t 作 = o # u h c j e p : p t m n t d p D ポ f 報 U P ( ン _ _ o s e g e s F t " o r e e e 成 n r e o s s r r s p t _ o a R イ . ( S A s リ u r g o a i l r ト o { o f r s l r l _ リ f s s l a o o p i i o : _ t l U ン J B E S e ク r e i n d n f f ー k s k _ e e f a f c ク " e e , d k n o n n r ( e サ P ト S a R S l エ l s n = e _ . _ ク e e i t t l . " " " i . o エ { l e i = n t t t s n イ A ( O s N W f ス p _ { r r s t ン n l e o u f h C A X s c n ス s = f r e d s ( ( e v ト L J N i A O ) ト = o u " s e e o を _ f s k r . e o c - e s t ト e . s s a e " " l l ( の _ S A c M R : n r n = s s k 取 r . = e n c a n c C r e l r J = = t . コ エ o f o U B O P 認 E D f s l a { p s e 得 e D s n s d t e S E f n f e S s s a s ン ラ a ) v R A N I 証 " e , m " o i n s R e _ c r e e p R x _ t . q O e e t テ ー d : e L S : _ ) = = { e C n o ( p U l r s f r n t F c t ( D u N l l a ン : _ r ( E A E s = " o s n s o P f e r _ s t " - e o s R e A f f t ツ " d r 例 _ P N o o e : n e _ e n A . s f t - : T p k e U s P . . u が , o i ) U I D s s l r t . c l s L s p _ o = T o t e l P t I h s s 作 t d R ) P . . f e s e s o f e _ e o t k y " k i n f A s _ e e _ 成 r e e L O g g . q e n t o ) B s n o e { p a e o , L . E a s c さ e n = I e e D u l t a k : = A s s k n e p n n = _ p N d s o れ s v T = N t t R e f - t i S i e e " p " ( d B o D e i d ま p r T e e U s . T u e r E o . n = : l : f N a A s P r o e し o u o n n P t U y s s e _ n s _ i " o t S t O s n た n e s = v v A s S p _ q U _ t r c " c c C n a E ( I , _ = ! s ) . ( ( L . E e c = u R c a e s a a s S e : _ N c = " e g f " " _ p R " o e L o t s r p t r R U T o ) . e " U P B o N : d l s } u p f p i f F d R , o 2 s t { S A A s A e o t k s o _ l o _ ト i L k 0 t e s E S S t M " g s s i _ n t i n t ー c } i 1 a n e R S E ( E a = i . e e c s o c / o ク t / e : t v l N W _ , p = n g s s o e k a v k ン ) j s u ( f A O U p _ e s d . e t n e 取 : s , s " . M R R " l 2 r t i e t n i d n 得 o _ D D E D L p i 0 e ( o # e _ o . _ 失 n c R R " " } a c 0 s n = x r n a r 敗 a o U U ) ) / s a : p / こ = t e / p e : p d P P u s t o t こ s v i s i e A A s " i n o で 2 p n + p { / , L L e : o s k ロ 0 o d j o c { _ _ r n e e グ 0 n . s n s d r B B / s / . n イ : s a o s r a e A A l e j c " ン e p n e f t s S S o l s o , セ . i " . _ a p E E g f o o ッ t + , t t [ o _ _ i . n k シ e j e o ' n U U n P " i ョ x s x k d s R R ? A } e ン t o t e a e L L _ S s を n , n t . " } f S 渡 " _ a t ) / o W す , r ' e j r O e ] x s m R s [ t o a D p ' ) n t } o t a = , n y p j s p i s e e / o . ' n n s ] o " t . d a r e t e / u p a s l r _ a t c c i o e c d ( l e ' e } " { ' c , s r f _ t ) o } k " e n _ r e s p o n s e . t e x t } " ) With this, content can be registered as follows. ...

March 1, 2025 · 9 min · Nakamura

Building a Multilingual Static Site with Next.js

Introduction This article was generated by GPT-4o. It explains how to build a multilingual static site using Next.js. In particular, it focuses on a configuration where the main language has no URL prefix while other languages have prefixes. It also includes configuration for deploying to GitHub Pages. Project Setup First, create a Next.js project. Initialize the project using create-next-app. n p x c r e a t e - n e x t - a p p @ l a t e s t n e x t - i n t l - s s g Installing Required Packages Install next-intl for multilingual support. ...

February 28, 2025 · 7 min · Nakamura

How to Get Coordinates of Sub-Images from a Larger Image

Overview I had an opportunity to obtain the coordinates within a larger image from multiple cropped sub-images. This article is a memo summarizing the method for doing this. I introduce a method using OpenCV’s SIFT (Scale-Invariant Feature Transform) to perform feature point matching between template images and the original image, estimate the affine transformation, and obtain the coordinates. Implementation Required Libraries p i p i n s t a l l o p e n c v - p y t h o n n u m p y t q d m Python Code The following code matches template images (PNG images in templates_dir) against a specified large image (image_path) using SIFT, and obtains the coordinates within the original image. ...

February 23, 2025 · 14 min · Nakamura

Creating TEI/XML from VTT Files

Overview This is a memorandum on how to create TEI/XML files from VTT files. Additionally, I will make it possible to access VTT files and TEI/XML files from an IIIF manifest. As a result, as shown below, the TEI/XML file is associated via SeeAlso, and the contents of the VTT file can be accessed from the “Annotations” tab. https://clover-iiif-demo.vercel.app/?manifest=https://movie-tei-demo.vercel.app/data/sdcommons_npl-02FT0102974177/sdcommons_npl-02FT0102974177_vtt.json References I referenced the following efforts from “The Ethiopian Language Archive.” The TEI/XML structuring method was particularly helpful. ...

February 21, 2025 · 33 min · Nakamura

Downloading Annotations Created with the mirador-annotations Plugin in Mirador 3

Overview This is a memo on the configuration for downloading annotations created with the mirador-annotations plugin in Mirador 3. https://mirador-annotations.vercel.app/ Background In the following article, I introduced how to register annotations with Google’s Firestore. To download the annotations registered there, the mirador-annotations plugin provides a download option, so I introduce that method here. Method The following is the source code of the demo page. By setting the exportLocalStorageAnnotations option to true, a download icon is displayed. ...

February 14, 2025 · 16 min · Nakamura

Changing the Pagination Limit in Algolia

Overview In Algolia, a pagination limit (paginationLimitedTo) is set for search results, and by default, only up to 1,000 results can be accessed. By changing this setting, you can adjust the maximum number of items available through pagination. Configuration Method To change the pagination limit (paginationLimitedTo), the following methods are available. Configuring from the Algolia Dashboard Log in to Algolia Select the target index Open Configuration → Pagination Change the paginationLimitedTo value ...

February 10, 2025 · 1 min · Nakamura

Prototyping an API for Retrieving Variant Character Lists

Overview The “Historiographical Institute Database Variant Character Identification List” is published on the following page. https://wwwap.hi.u-tokyo.ac.jp/ships/itaiji_list.jsp This time, I will create an API to retrieve the data published on the above page in JSON format. What Was Developed You can access it from the following URL. https://hi-itaiji.vercel.app/ It returns a mapping using “char (variant character)” from the identification list as the key and the “base” kanji as the value. ...

February 10, 2025 · 1 min · Nakamura