Uploading Files and More Using the GakuNin RDM API

Background These are notes on how to upload files and perform other operations using the GakuNin RDM API. References The following article explains how to obtain a PAT (Personal Access Token). The following article introduces a method using OAuth (Open Authorization). If you are using it from a web application, this may be helpful. Method I created the following repository using nbdev. https://github.com/nakamura196/grdm-tools The documentation can be found here. ...

November 16, 2024 · 2 min · Nakamura

A Python Library for Visualizing the Contents of Archivematica METS Files

Overview I created a Python library for visualizing the contents of Archivematica METS files. For example, it visualizes aggregated results of processes (premis:event) performed during AIP creation, as shown below. Background In the following article, I introduced METSFlask, a web application for exploring Archivematica METS files in a human-friendly way. What I created this time is a library version of the functionality provided by METSFlask, making it easier to use outside of Flask. ...

October 31, 2024 · 1 min · Nakamura

Applying Google Cloud Vision to Image Files to Create IIIF Manifests and TEI/XML Files

Overview I created a library that applies Google Cloud Vision to image files and generates IIIF manifest and TEI/XML files. https://github.com/nakamura196/iiif_tei_py This article explains how to use the library. Usage You can check the usage and more at the following page. https://nakamura196.github.io/iiif_tei_py/ Installing the Library Install the library from the GitHub repository. p i p i n s t a l l h t t p s : / / g i t h u b . c o m / n a k a m u r a 1 9 6 / i i i f _ t e i _ p y Creating a GC Service Account Download a GC (Google Cloud) service account key (JSON file) by referring to articles such as the following. ...

August 8, 2024 · 38 min · Nakamura

Handling concurrent.futures.process.BrokenProcessPool

Overview When running nbdev_prepare with nbdev, the following error occurred. concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending. Solution Running the following command beforehand resolved the error. e x p o r t O B J C _ D I S A B L E _ I N I T I A L I Z E _ F O R K _ S A F E T Y = Y E S Summary I hope this is helpful for anyone experiencing the same issue. ...

July 18, 2024 · 1 min · Nakamura

Handling nbdev Errors on macOS

Overview When using nbdev on macOS, the following error occurred. n o o T c b b b r o d j j a n e c c c c v [ [ e u _ 4 4 b r p 8 8 a r r 3 3 c e e 4 4 k n p 8 8 t a ] ] ( . r : : m f e o u + + s t [ [ t u _ _ r _ _ r e N N e s S S c . C C e p F F n r C C t o o o c n n c e s s a s t t l s a a l . n n B t t l r S S a o t t s k r r t e i i ) n n n : P g g r o i i c n n e i i s t t s i i P a a o l l o i i l z z : e e ] ] A m m p a a r y y o c h h e a a s v v s e e i b b n e e e e t n n h e i i n n p r p p o r r c o o e g g s r r s e e s s p s s o o i i l n n w a a a n n s o o t t t h h e e e r r r m i t t n h h a r r t e e e a a d d d a w w b h h r e e u n n p t f f l o o y r r k k w ( ( h ) ) i l w w e a a s s t h c c e a a l l f l l u e e t d d u . . r e W e w a c s a n r n u o n t n i s n a g f e o l r y p c e a n l d l i n i g t . o r i g n o r e i t i n t h e f o r k ( ) c h i l d p r o c e s s . C r a s h i n g i n s t e a d . S e t a b r e a k p o i n t o n o b j c _ i n i t i a l i z e A f t e r F o r k E r r o r t o d e b u g . This is a personal note on addressing this error. ...

June 24, 2024 · 4 min · Nakamura

Handling "two factor auth enabled..." on PyPI

Overview Two-factor authentication is becoming mandatory on PyPI. https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/ After setting up two-factor authentication and attempting to upload, the following error occurred. U 1 W E p 0 A R l 0 R R o % N O a I R d ━ N i ━ G n ━ g ━ ━ E H U u x ━ r T s p x ━ r T e l x ━ o P r o x ━ r E a . ━ r < d w ━ d r ア h ━ u o カ i l ━ r r ウ n ━ i : ン ━ n ト p ━ g 4 名 l ━ 0 > a ━ u 1 c ━ p h e ━ l U a ━ o n s o ━ a a f ━ d u t ━ . t w p ━ h o a ━ R o s ━ e r f s ━ t i a w ━ r z c o ━ y e t r ━ d o d ━ w r . ━ i f ━ t r a ━ h o u ━ m t ━ t h ━ h h ━ e t e ━ t n p a 2 s b 2 v : l . e / e 2 r / d / b u , 2 o p 2 s l a . e o n 2 a o d A k p . P B t p I i y • o p T n i o 0 . k 0 f o e : o r n 0 r g 0 / o m l r • o e r g T 6 e a r 5 c u . d y s 2 e / t t e M a d B i / l P s s u . b l i s h e r m u s t b e u s e d t o Solution I had ~/.pypirc configured as follows. ...

September 20, 2023 · 3 min · Nakamura

Memo on Using nbdev

Overview When creating Python packages, I use nbdev. https://nbdev.fast.ai/ nbdev is described as follows: Write, test, document, and distribute software packages and technical articles — all in one place, your notebook. This article serves as a memo when using nbdev. Installation The following tutorial page is a helpful reference. https://nbdev.fast.ai/tutorials/tutorial.html Below is a brief overview of the workflow. After installing the related tools, create a GitHub repository, clone it, and then execute the following in the cloned directory. ...

March 15, 2023 · 2 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