| ISSN online: 2282-5665 © Consiglio Nazionale delle Ricerche C31 ISTITUTO DI RICERCA SULUIMPRESA E LO SVILUPPO Ottobre 2013 Rapporto tecnico N.45 STEP BY STEP INSTALLATION GUIDE OF A DIGITAL PRESERVATION INFRASTRUCTURE PART 2 Giancarlo Birello, Ivano Fucile, Valter Giovanetti, Anna Perin © c#=—_I1S Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 © Consiglio Nazionale delle Ricerche c=—_S Istituto di Ricerche sull’Impresa e Lo Sviluppo RAPPORTO TECNICO CNR-CERIS Anno 8, N° 45; Ottobre 2013 Direttore Responsabile Secondo Rolfo Direzione e Redazione CNR-Ceris Istituto di Ricerca sull’Impresa e lo Sviluppo Via Real Collegio, 30 10024 Moncalieri (Torino), Italy Tel. +39 011 6824.911 Fax +39 011 6824.966 segreteria@ceris.cnr.it http://www.ceris.cnr.it Sede di Roma Via dei Taurini, 19 00185 Roma, Italy Tel. 06 49937810 Fax 06 49937884 Sede di Milano Via Bassini, 15 20121 Milano, Italy tel. 02 23699501 Fax 02 23699530 Segreteria di redazione Enrico Viarisio e.viarisio@ceris.cnr.it ©N5o Copyright © Ottobre 2013 by CNR-Ceris Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 © c=—_1S STEP BY STEP INSTALLATION GUIDE OF A DIGITAL PRESERVATION INFRASTRUCTURE PART 2 Giancarlo Birello*, lvano Fucile Valter Giovanetti (CNR-Ceris, IT Office) Anna Perin (CNR-Ceris, Library) CNR-Ceris IT Office Strada delle Cacce, 73 10135 Torino — Italy Phone: +39 011 3977533/4/5 CNR-Ceris Library Via Real Collegio, 30 10024 Moncalieri (Torino) — Italy Phone: +39 011 6824928 * Corresponding author: g.birello@ceris.cnr.it ABSTRACT: The Ceris-CNR project of digital preservation infrastructure has been committed by Bess (Social Sci- ence Electronic Library of Piemonte) for years 2011-2012 and confirmed for year 2013 sponsored by Compagnia di San Paolo of Turin. Ceris-CNR role is to handle all the post-scan of the digitalization, for this purpose it has deployed the software and server platforms of the repository and also the web portal for the presentation, research and consulting. This report is the second part of step by step guide to build the digital archive infrastructure. KEY WORDS: open-source, islandora, repository, digital archive, cms © c#=—_I1S Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 Table of Contents DT UNtPOMUCHION. 00. eee cece cece cece cee ceceececeececeeseceesecsesececseceesesscsesecseseuseseseeceesesesecsesiesecssieseeeseseessseseseesieeees 5 2 Front-end SCrvel..........cccececec ee ceecececeececeeesceccecsececseseceesecseececseseeseceesesecsecesseseseeesseseesseseseeeesecesseseseeeeeaee 6 2.1 Collapsed breadcrumb. 2.2 Custom Theme........... 2.3 Custom Collection tabs.. “ 2.4 Custom search result..... 9 2.5 Custom Book and Page TABS. 11 2.6 Oid-O-Matic connector............ 14 2.7 Custom Pager and Collection rendering. 16 2.8 Multiple word search.............::.::eceeeeeee 2.9 Collection object for custom query and view. 6 a7 8 3 Repository... eee eceece eee eceeeeeeeceeeeeeeeeeseeeeeeeneeeaeenes 3.1 Add PICO metadata to OAI-PMH.............0c ee 3.2 Dissemination method for Low-Res JPEG from TIFF. 4 Managing and ingesting SCriPts............ eee ecceceeeeeeseeeeeeeeeeeeeceeeeseneeeseesececaeseeeeseeeeeeeeeeaeseeeeeeeeeeeneeeeeeees 28 4.1 Script to modify DC datastream dc:date. 4.2 Generate BOOK files from PDF. 4.3 Book ingesting script update 5 Webography............:cceceeeeeeenees 6B APPendix....... ee ceceeceecceseesceseeseesecsecsecseceeeeaeesecseeaecsecsecseceeeeeerenseeaeceeceesaesseeeaesaeeaeeaeeeeneeeeeseeeeeseeeeeeneeneeeees 33 6.1 Front-end Servet.........0.0000 6.1.1 sites/all/modules/islandora-github/ObjectHelper.inc. 6.1.2 sites/allthemes/digibess/digibess.css.................. 6.1.3 sites/all/modules/islandora-github/CollectionClass.inc.............:ccceceeseeeeeneees 6.1.4 sites/all/modules/islandora_solr_custom/theme/islandora_solr_custom.theme.inc. 6.1.5 sites/all/modules/islandora_solr_custom/theme/islandora-solr-custom.tpl.php. 6.1.6 sites/all/modules/islandora_solr_custom/css/islandora_solr_custom_tpl.css. 6.1.7 sites/all/modules/islandora_solution_pack_book/tocnr_book.inc.................. 6.1.8 sites/all/modules/islandora_solution_pack_book/xsl/tocnr_book_view.xsl. 6.1.9 sites/all/modules/islandora_solution_pack_book/islandora_book.modul 6.1.10 sites/all/modules/islandora-github/xsl/sparql_to_html.xsl... 6.1.11 sites/all/modules/islandora_solr_search/IslandoraSolrResults.in 6.1.12 sites/all/modules/islandora_solr_search/IslandoraSolrQueryProcessor.inc 6.1.13 sites/all/modules/islandora_solr_search/islandora_solr_search.module 6.2 Back-end SErVEl........ eee cece cee ce cee csceeeeceeceeseeecsecessesceseeseeseessesieseeeeeesieeess 6.2.1 ingpiubook.sh........ 6.2.2 ingbookepages.sh. 6.2.3 templateBookMaster.xml we 6.2.4 templatePageMaster.xMl..........cccceceeccseeeeeeeeeseeseeseeseceeeececeeeeeeseeeaeeaeseeeeesneseeeeeseeteeeenteneeees 94 Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 © c=—_1S 1 Introduction The CNR Ceris project of digital preservation infrastructure has been committed by Bess (Social Science Electronic Library of Piemonte) for years 2011-2012 and confirmed for year 2013. Bess is a group of eighteen socioeconomic libraries in Piemonte (Italy) included Ceris library, they share a common specialization even if they are private foundations, research institutes, and university libraries that means different libraries in terms of size, parent institution, purpose, financial endowment, as well as collections. One of the initiative promoted by Bess and sponsored by Compagnia di San Paolo of Turin, is the creation of a digital repository of sources of Piedmontese society and economy. Bess has set up a digitalization laboratory, to be directly used by the members, for the conservation and preservation of collections included out of print and gray literature materials; External partners are welcome to digitalize and share their archives, Istituto Gramsci for example has licensed “Sisifo” review as well as Centro Storico FIAT with “Illustrato Fiat” and “Blu Lancia” and Archivio Storico Lavazza with “Notizie Lavazza” that are now accessible through Bess archive. Other institutions have agree to share some collections yet. The resulting repository is serving as a source of regional and economic information to the whole community. CNR Ceris role is to handle all the post-scan of the digitalization and had to provide for the management of large volumes of data with the availability of space storage for the digitized works with characteristics of stability, versatility and dynamism. Currently (September, 2013) 416.751 pages are available in the repository. CNR Ceris has deployed the software and server platforms of the repository, in a virtualized and redundant infrastructure and also take care of the design, development and management of the web portal (front-end) for the presentation, research and consulting data of the digitalized items. Moreover the repository is OAI-PMH compliant and is well harvested by the main National and International meta-repository . Here listed some evidence of numbers, hardware and software used, most of the aspects will be analyzed in this paper or are available in the "Step by step Installation Guide of a Digital Preservation Infrastructure.", Rapporto Tecnico N.42, maggio 2012, CNR Ceris: e files: pdf/a, high resolution tiff, txt file e Metadata e 2-node active/passive open-source cluster e Kernel-based Virtual Machine (KVM) hypervisor e repository: Fedora Commons e harvesting OAI-PMH e — scripting for ingesting e Custom models and datastreams e front-end server: Drupal and Islandora e Solr - search platform from the Apache Lucene project The open-source community helped us to build on our project and this paper is at disposal of the open-source community, in particular we have to thank you Islandora Team with which we have exchanged many code pages. qoc=I1S 2 Front-end server Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 The following customizations regard code modifications of Islandora 6.x modules in drupal front- end CMS as developed in the first part of this guide. 2.1 Collapsed breadcrumb To limit title length in breadcrumb to avoid display overflow. Edit Main breadcrumb (not Search breadcrumb) builder code: nano -w sites/all/modules/islandora-github/ObjectHelper.inc [6.1.1] function getBreadcrumbs($pid, s$breadcrumbs, $level=10) { module_load_include('inc', 'fedora_repository', '‘api/fedora_utils'); // Before executing the query, we hve a base case of accessing the top-level collection global $base_url; if ($pid == variable_get('fedora_repository pid', ‘islandora:root')) ( $breadcrumbs[] = 1(t('Digital fepository'), 'fedora/repository’) $breadcrumbs[] = 1(t('Home'), $base_url); } else { $query string = ‘select $parentObject $title $content from <#ri> where ( $title and $parentObject $content and ( $parentObject or $parentObject or $parentObject and $parentObject ) minus $content $query string = htmlentities(urlencode($query_string)); $url = variable_get('fedora_repository_url', "http://localhost :8080/fedora/risearch'); $url .= "2type=tupleséflush=TRUES format=CSVé1imit=1éoffset=0slang=itql&éstream=onéquer: $query_string; $result = preg_split('/[\r\n]+/', do_curl($url)); array shift ($result); // throw away first line $matches = str_getesv(join("\n", $result)); if ($matches FALSE) ( $parent = preg _replace('/*info:fedora\//', '', $matches[0]); if ($parent == variable_get('fedora_repository pid', 'islandora:root')) ( $breadcrumbs[] = 1(t("Digital repository'), 'fedora/repository'); $breadcrumbs [] 1(t('Home'), $base_url); t elseif ($level > 0) { Sthis->getBreadcrumbs ($parent, Sbreadcrumbs, $level - 1); The following picture shows code result: BESS Digital Archive L Dy — er Home> Digital repository > BESS collections > CNR Ceris>CNR Ceris Publicafons> CNR Ceris Technical Repor... Step by step installation guide of a digital preservatid Search ay BOOK Read Index Pages __ PAGE 0001 Title s One or more words: and = Dublin Core - MetaData title Step by step installation guide of a digital preservation infrastructure creator _Birello Giancarlo, Fucile Ivano, Giovanetti Valter, Perin Anna, Minuzzo Tiziano Picture 1: Collapsed breadcrumb Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 qc=-1S 2.2 Custom Theme Create a custom theme for drupal containing style definitions for standard and custom html tags. * SSH login on drupal server * Clone Garland theme ed /usr/share/rootsitedir mkdir sites/all/themes/bessparent cp -R themes/garland/* sites/all/themes/bessparent/ rm -R sites/all/themes/bessparent/minnelli Configure parent theme mv sites/all/themes/bessparent/garland.info sites/all/themes/bessparent/bessparent.info nano -w sites/all/themes/bessparent/bessparent.info name = DigiBessParent description = Garland clone. version = VERSION core = 6.x engine = phptemplate stylesheets[all][] = style.css stylesheets (print][] = print.css } Information added by drupal.org packaging script on 2012-02-29 versio Bemma project datestamp * Create child theme mkdir sites/all/themes/digibess nano -w sites/all/themes/digibess/digibess.info pal" 1330534547" name = DigiBess description = DigiBess theme version = VERSION core = 6.x base theme = bessparent stylesheets[all][] = digibess.css } Information added by drupal.org packaging script on 2012-02-29 jversion = "6.25" #project = "drupal" jdatestamp = "1330534547" * Create child template to override functions nano -w sites/all/themes/digibess/template.php '. implode('>', $breadcrumb: t s''; t * Create child CSS to override formatting nano -w sites/all/themes/digibess/digibess.css * Copy modified bg-content.png in sites/all/themes/digibess/images * Copy new bg-tabs.png in sites/all/themes/digibess/images * Enable theme browsing to siteURL/admin/build/themes 7 BESS Digital Archive D Home> Digital repostory> BESS colecons> CNR Ceris>CNR Cer Publeations Browse Laboratory Team. Browse Digital Archive ENR Ceris Technical Reports 1-20 21-40 41-41 e treatrew: a user-written STATA routine for estimating Average Treatment Effects by reweighting on propensity e ‘Step by step instalation guide of @ digital preservation infrastructure CS € straordinaria (Cluster HA: Ordinary and extraordinary maintenance) Policies stats es ‘Storage In HA: Manutenzione ordinaria Un quaéro Internazionale, europeo ed Italiano sulla responsabilitd sociale delle organizzazioni con focus sull'etica ello sviluppo organizzativo [6.1.2] Picture 2: DigiBESS theme example © c#=—_I1S Rapporto Tecnico, Anno 8, n° 45 ottobre 2013 2.3 Custom Collection tabs Collection view tabs are defined in CollectionClass.inc file. We modified this file to show custom title and a new tab for collection information page contained in INFO datastream. nano -w sites/all/modules/islandora-github/CollectionClass.inc [6.1.3] function showFieldSets($page number) ( module_load_include('inc', 'fedora_repository', 'api/fedora_item') global $base_url; Stabset = array(); global $user; SobjectHelper = new ObjectHelper (); Sitem = new Fedora_Item($this->pid); $query = NULL; if (Sitem->exists() && array key exists('QUERY', Sitem->datastreams)) ( Squery = Sitem->get_datastream dissemination ('QUERY'); } Sresults = $this->getRelatedItems($this->pid, $query); return $tabset; } At repository level you have to add a datastream INFO to Collection object in text/html format with information about collection. Available header tags are h2 (without background) and h4 (with theme background), for example: Lettera da Tecnocity

Lettera da Tecnocity (1984 ? 1992)

Direttore: Marcello Pacini
Un progetto della Fondazione Agnelli per il rilancio dell?area metropolitana torinese

LO SFONDO


Nel decennio tra gli anni ottanta e novanta la Fondazione Giovanni Agnelli @ impegnata in un ampio programma volto a studiare le condizioni che rendono possibile e governano 1?innovazione tecnologica