Book SP


  • Islandora Paged Content
gs -v
GPL Ghostscript 9.18 (2015-10-05)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.

apt-get install poppler-utils

cd /var/www/archive.digibess.eu/sites/all/modules/
git clone git://github.com/Islandora/islandora_paged_content
cd /var/www/archive.digibess.eu
drush -u 1 en islandora_paged_content

Browse to config: admin/islandora/solution_pack_config/paged_content
	gs (GhostScript) = /usr/bin/gs
        pdfinfo = /usr/bin/pdfinfo
        pdftotext = /usr/bin/pdftotext
        Allow Extraction of Raw Text = NO
 	djatoka URL = http://archive.digibess.eu/djatoka/
 	Solr page sequence number field = RELS_EXT_isSequenceNumber_literal_ms
        Use Solr to derive pages and sequence numbers = NO
        Set page labels to sequence numbers = NO
        Hide Page Objects From Search Results = NO
  • Tesseract
apt-get install tesseract-ocr tesseract-ocr-eng tesseract-ocr-ita tesseract-ocr-fra tesseract-ocr-spa tesseract-ocr-deu tesseract-ocr-lat

tesseract -v
tesseract 3.04.01
 leptonica-1.73
  libgif 5.1.2 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.4.4 : libopenjp2 2.1.0

tesseract --list-langs
List of available languages (7):
osd
deu
fra
spa
ita
equ
eng
lat
  • Islandora OCR
cd /var/www/archive.digibess.eu/sites/all/modules/
git clone git://github.com/Islandora/islandora_ocr
cd /var/www/archive.digibess.eu
drush -u 1 en islandora_ocr

Browse to config: admin/islandora/tools/ocr
     Tesseract = /usr/bin/tesseract
     Languages available for OCR 
       English = YES
       Italian = YES
     Enable Solr Fast Vector Highlighting = YES
     Solr field containing OCR text = text_nodes_HOCR_hlt
     Maximum number of results to return in a Solr query = 32
  • Islandora Internet Archive Bookreader
  • Option 1: Islandora git + IABR v1 (OBSOLETE)
cd /var/www/archive.digibess.eu/sites/all/libraries/
git clone git://github.com/Islandora/internet_archive_bookreader
mv internet_archive_bookreader bookreader

nano -w sites/all/libraries/bookreader/BookReader/BookReader.css

div#BRpage {
    float: right;
-    width: 280px;
+    width: 300px;
    padding-left:12px;
    text-align: right;
}

cd /var/www/archive.digibess.eu/sites/all/modules/
git clone git://github.com/Islandora/islandora_internet_archive_bookreader
  • Option 2: Diego git + IABR v2 (many many thanks Diego!!)
cd /var/www/archive.digibess.eu/sites/all/libraries/
git clone git://github.com/internetarchive/bookreader (branc Master, Commits on Jul 28, 2017)

cd /var/www/archive.digibess.eu/sites/all/modules/
git clone -b 7.x-2dev git://github.com/DiegoPino/islandora_internet_archive_bookreader (branch 7.x-2dev latest Commits on Nov 15, 2017)

Browse to admin/islandora/islandora_viewers/internet_archive_bookreader :

  - Image Server : IIIF Image Server
  - IIIF Image Server Base URL : http://archive.digibess.eu/iiif-server/iiif/2
  - IIIF image max width : 0
  - Tile source URL prefix : http://repo.digibess.eu/fedora/objects/
  - Tile source URL suffix : /datastreams/JP2/content
  - Enable token : NO
  - Views to render into Info tab : bookreader_info_tab
  - Solr field relating pages to book PIDs : RELS_EXT_isMemberOf_uri_ms
  - Overlay Opacity : 0.5
  - The content type being displayed within the IAV. : book
  - Default page view : Side by side
  - Force the Internet Archive Bookreader into full screen for mobile users? : YES
  - Use the JPG datastream as a backup : NO

(OBSOLETE) Hardcoded redirect tile source to Fedora.

nano -w islandora_internet_archive_bookreader/js/islandora_book_reader.js
  IslandoraBookReader.prototype.getDjatokaUri = function(resource_uri) {
    var base_uri = this.settings.djatokaUri;
    //Do some sanitation on that base uri.
    //Since it comes from an admin form, let's make sure there's a '/' at the
    //end of it.
    if (base_uri.charAt(base_uri.length) != '/') {
      base_uri += '/';
    }
 
+    var new_resource_uri = resource_uri.replace('archive.digibess.eu/islandora/object', 'repo.digibess.eu/fedora/objects');
//if djatoka on the same server than Fedora you can use instead
+    var new_resource_uri = resource_uri.replace('archive.digibess.eu/islandora/object', '127.0.0.1:8080/fedora/objects');
 
+    new_resource_uri = new_resource_uri.replace('datastream/JP2/view', 'datastreams/JP2/content');
    var params = $.param({
-      'rft_id': resource_uri,
+      'rft_id': new_resource_uri,
      'url_ver': 'Z39.88-2004',
      'svc_id': 'info:lanl-repo/svc/getRegion',
      'svc_val_fmt': 'info:ofi/fmt:kev:mtx:jpeg2000',
      'svc.format': 'image/jpeg',
      'svc.level': this.settings.compression,
      'svc.rotate': 0
    });
    return (base_uri + 'resolver?' + params);
  };
  • Colorbox (OBSOLETE, no more needed)
cd /var/www/archive.digibess.eu
drush dl colorbox
drush -u 1 en colorbox

Configure colorbox: admin/config/media/colorbox

  • Enable Colorbox inline YES
cd /var/www/archive.digibess.eu
drush -u 1 en islandora_internet_archive_bookreader
  • Islandora Book SP
cd /var/www/archive.digibess.eu/sites/all/modules/
git clone git://github.com/Islandora/islandora_solution_pack_book
cd /var/www/archive.digibess.eu
drush -u 1 en islandora_book

Browse to config: admin/islandora/solution_pack_config/book

  • PDF datastream. Requires ImageMagick = YES
  • Image datastreams (TN, JPEG, JP2). Requires Large Image Solution Pack = YES
  • OCR datastreams (OCR, HOCR). Requires Islandora OCR module = YES
  • Parent Solr Field = RELS_EXT_isMemberOf_uri_ms
  • Display object metadata = YES (then NO when DC Views activated)
  • Book Viewers = Internet Archive BookReader
  • Page Viewers = OpenSeadragon
  • Book batch SP and CRUD
cd /var/www/archive.digibess.eu/sites/all/modules/
git clone git://github.com/Islandora/islandora_batch
git clone git://github.com/Islandora/islandora_book_batch
drush -u 1 en islandora_batch islandora_book_batch

git clone git://github.com/mjordan/islandora_datastream_crud
drush -u 1 en islandora_datastream_crud
  • Islandora Book customization
Default to 2up insted of 1up

nano -w modules/islandora_solution_pack_book/islandora_book.module
...
    if (islandora_object_access(ISLANDORA_VIEW_OBJECTS, islandora_object_load($book_pid))) {
      $search_results['object_url'] = "islandora/object/$book_pid";
-      $search_results['object_url_fragment'] = "page/$page_number/mode/1up";
+      $search_results['object_url_fragment'] = "page/$page_number/mode/2up";


Change default h2 to h4 tag for "In collections"

nano -w modules/islandora_solution_pack_book/theme/islandora-book-book.tpl.php

	    <h4><?php print t('In collections'); ?></h4>
 
 
reloaded/fe_book.txt ยท Last modified: 2017/12/07 10:04 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki