Skip to content
Pietro Liuzzo edited this page Jan 18, 2018 · 16 revisions

Make server IIIF ready

Description

Loris needs to be installed in server https://github.com/loris-imageserver/loris OR https://github.com/ruven/iipsrv/

evaluate if JPEG2000 support is actually needed or not, as the Kakadu sdk required is not open licence software.

Notes

http://iiif.io/technical-details/ need then to store images and publish api compliant metadata

surface elements with graphic[@url] in TEI documents for the links to images.

Implementation

test on Collation quires

  • display for each quire the images in a mirador viewer
  • display the single zoomable image on a click on each link to a folio
  • display a viewer for the whole mss

Initial downloads of dependencies started

Prerequisites

image server, image metadata serialization for presentation api 2.1

mounting the UHH disks to the server

https://www.rrz.uni-hamburg.de/services/datenhaltung/uhhdisk/cifs.html

I installed cifs-utils and samba

I created a directory HLZ3 in /media

Then to mount one of the disks (only those with *-user) I used the following command as per instructions

sudo mount -t cifs //VSHLZ3.nds.uni-hamburg.de/HLZ3 /media/HLZ3 -o username=fonv565,uid=1000,gid=1000,file_mode=0600,dir_mode=0700,noperm,vers=2.0,sec=ntlmv2i

to prepare images on UHH Disk

move the files from the "* User Resized"folder to /media/HLZ3/Ethio-Spare3/TIFF/REPOID/MSID

mkdir REPOID/MSID

or only MSID

example on MR001 copy the JPG to the TIFF/REPO/MS directory

sudo cp /media/HLZ3/Ethio-Spare3/"MR-Medre Ruba Qeddest Sellase - User"/"MR-001 User"/"MR-001 User Resized"/*.JPG /media/HLZ3/Ethio-Spare3/TIFF/MR/001

run the following script for each directory to produce the tiled tif files

sudo /media/add/images/JPG2tif.sh /media/HLZ3/Ethio-Spare3/TIFF/MR

this will look into each directory inside the one in the parameter (eg all the manuscripts in MR) or

sudo /media/add/images/jpg2tif.sh /media/HLZ3/Ethio-Spare3/TIFF/EMIP/Codices

if the extension of the jpg is smallcaps

this will produce the tiffs in that folder

cd /media/HLZ3/Ethio-Spare3/TIFF/MR/001

for Ethio-Spare Manuscripts, delete the copied JPG, as these are stored in another server.

/media/HLZ3/Ethio-Spare3/TIFF/MR/001

add in the TEI record eg for ES manuscripts

<idno facs="MR/001/MR-001" n="106">MR-001</idno>

EMIP manuscripts will already have @facs

progress

one test manuscript is now in the new 100 GB hard disk.

  • test file is BMQ-003 (ESbmq003)
  • files have been copied from UHHDisk 5 to local machine
  • files have been uploaded to betamasaheft server on /home/liuzzo and then sudo mv to /media/add/images
scp -r /Users/Pietro/Desktop/011 [email protected]:/home/liuzzo

then navigate to /home/liuzzo and

sudo mv 011 /media/add/images/KAE
  • folder for institution is BMQ (should be the institution id...) and the progressive number is a subfolder. files are JPG.
  • files have been converted following http://iipimage.sourceforge.net/documentation/images/ using the ad hoc script jpg2tif.sh in /media/add/images with BMQ/003 as argument. This takes some time.
sudo ./jpg2tif.sh KAE/011
  • JPG files have been removed so that only .tif are in the folder.
  • the folder size is 1.4 G. This is a MINIMAL improvement compared to the original 1.6G of the BMQM-003 User folder from the server containing NEF, JPG and resized JPG. but we do not really need to spare space... the point here is that they will need to be moved and converted to tif

we now have a new version of iip image server, 1.0 installed from git

https://github.com/ruven/iipsrv

the server has been set following

but instead of

 cp ~/iipsrv/src/iipsrv.fcgi /var/www/localhost/fcgi-bin/

the file has been moved to

 sudo cp ~/iipsrv/src/iipsrv.fcgi /usr/lib/iipimage-server

further following

rewrting is set in the nginx server

 merge_slashes off;
        rewrite ^/iiif/(.*) /iipsrv/iipsrv.fcgi?IIIF=/media/add/images/%2F$1 last;

so that now

are both available for the test manuscript images

the mirador viewer has been added by following the instructions here http://projectmirador.org/docs/docs/getting-started.html After building it I took what was into /build after the installation process and put it into my exist-db app resources folder to be able to use it in exist. controller.xql had to be told to redirect internal calls to build/mirador to resources/mirador.

The viewer is loaded by constructing as a string a variable containing the needed data and adding a sjavacript with the settings calling those variables.

<script type="text/javascript">
var data = [{manifestUri: "http://digi.vatlib.it/iiif/MSS_Vat.et.1/manifest.json", location: "Biblioteca Apostolica Vaticana"}]
</script>
  <script type="text/javascript">
      $(function() {
        Mirador({
          id: "viewer",
          data: data
        });
      });
    </script>

EMIP images storage

  • basic metadata from google spreadsheet import is DONE

  • Photos needs to be transferred and stored, plan is to do so from the drives which Steve has here (18.1.2018).

  • Photos needs to be converted to TIF running once over a week end or for a week the jpg2tif.sh script, which will loop through each of the manuscripts folders and convert to a tiled .tif file

  • the copied .jpg files should be kept in this case, they will preserve also the name which will get deleted in the following step.

  • Photos need to be renamed, to avoid gaps in the sequences for the the IIIF manifests

    • navigate to the folder with the EMIP images

      /media/HLZ3/Ethio-Spare3/TIFF/EMIP/Codices

    • then run the python script which will rename the tif files to 3 digits (this removes the need to copy the first part of the filenames in the metadata) then run from this directory

      sudo python /media/add/images/renumber.py

      this will also loop through each subdirectory of Codices (i.e. the manuscripts) and rename the files.

    • Photos need to be tidied up from doubles, close ups, etc. (true also for ES!)

  • Metadata need to be updated with the number of images on the server for one ms (student work?)

back to list

Clone this wiki locally