Skip to content
Pietro Liuzzo edited this page Jan 16, 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/001

or

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

if the extension of the jpg is smallcaps

this will produce the tiffs in that folder

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

delete the copied JPG

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

add in the TEI record eg

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

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>

back to list

Clone this wiki locally