Changeset 38294


Ignore:
Timestamp:
2023-10-06T18:07:52+13:00 (7 months ago)
Author:
davidb
Message:

Tighten up full-build script sequence

Location:
gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/ACTIVATE.sh

    r38240 r38294  
    33source ../_local_collect_config.sh
    44
     5if [ "x$GSDL3SRCHOME" = "x" ] ; then
     6    pushd ../../../../../ && . ./SETUP.bash && popd
     7fi
    58
    69echo "Obtaining lock: gs3-building.flock"
    710
    8 #sudo -u $gs_server_username -- \
    9 bash -c "pushd ../../../../../ && . ./gs3-setup.sh && popd && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* \"$col\""
     11##sudo -u $gs_server_username -- \
     12#bash -c "pushd ../../../../../ && . ./gs3-setup.sh && popd && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* \"$col\""
     13
     14
     15./DESTROY-ALL-PREV-OPENANNOTATION-LISTS.sh
     16
     17echo ""
     18echo "####"
     19echo "# Activating the collection"
     20echo "####"
     21echo ""
     22
     23
     24if [ $gs_server_username != $USER ] ; then
     25    sudo -u $gs_server_username -- \
     26     flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* "$col"
     27else
     28    flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* "$col"
     29   
     30fi
    1031
    1132echo "Releasing lock: gs3-building.flock"
     33/bin/rm gs3-building.flock
     34
     35echo ""
     36echo "####"
     37echo "# Done activating ... moving on to submitting annotation IDs"
     38echo "####"
     39echo ""
     40
     41./POPULATE-ALL-NEW-OPENANNOTATION-LISTS.sh
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/BUILDCOL.sh

    r38281 r38294  
    2323if [ $gs_server_username != $USER ] ; then
    2424    sudo -u $gs_server_username -- \
    25      flock gs3-building.flock buildcol.pl -removeold -site $site $col $*
     25     flock gs3-building.flock buildcol.pl -removeold -site $site $* $col
    2626else
    27     flock gs3-building.flock buildcol.pl -removeold -site $site $col $*
     27    flock gs3-building.flock buildcol.pl -removeold -site $site $* $col
     28
     29#    flock gs3-building.flock buildcol.pl -removeold -site $site -activate -library_url $gs_library_url $* $col
     30   
     31#    flock gs3-building.flock buildcol.pl -removeold -site $site        -mode compress_text $* $col \
     32#   && echo "-------------------" \
     33#   && flock gs3-building.flock buildcol.pl -removeold -site $site -mode build_index $* $col \
     34#   && echo "-------------------" \
     35#   && flock gs3-building.flock buildcol.pl -removeold -site $site -mode infodb $* $col \
     36#   && echo "-------------------" \
     37#   && flock gs3-building.flock activate.pl -removeold -site $site -library_url $gs_library_url $* $col \
     38#   && echo "-------------------" \
     39#   && flock gs3-building.flock buildcol.pl -removeold -site $site -mode extra -library_url $gs_library_url $* $col
    2840fi
    2941
     
    4153
    4254
    43 
    44 echo ""
    4555echo "****"
    46 echo "****"
    47 echo "Before running ./ACTIVATE.sh consider whether you want/need to ingest the"
    48 echo "OpenAnnotations into the Simple Annotation Server:"
    49 echo "    ./SUBMIT-ALL-OPENANNOTATION-LISTS.sh"
    50 echo ""
    51 echo "And then index them for Mirador3 within document searching:"
    52 echo "    ./INDEX-ALL-IIIF-MANIFESTS.sh"
    53 echo "****"
     56echo "* Next run ./ACTIVATE.sh"
    5457echo "****"
    5558echo ""
    5659
     60#echo ""
     61#echo "****"
     62#echo "****"
     63#echo "Before running ./ACTIVATE.sh consider whether you want/need to ingest the"
     64#echo "OpenAnnotations into the Simple Annotation Server:"
     65#echo "    ./SUBMIT-ALL-OPENANNOTATION-LISTS.sh"
     66#echo ""
     67#echo "And then index them for Mirador3 within document searching:"
     68#echo "    ./INDEX-ALL-IIIF-MANIFESTS.sh"
     69#echo "****"
     70#echo "****"
     71#echo ""
     72
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/DELETE-OPENANNOTATION-LIST.sh

    r38240 r38294  
    55iuri_id=$1
    66
    7 
    87internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore/annotation"
    9 #internal_url_base="http://localhost:4343/simpleAnnotationStore/annotation"
    108
    119post_url="${internal_url_base}/destroy"
    1210
    13 echo ""
    14 #echo curl -X DELETE -d "uri=${iuri_id}" "$post_url"
    15 #curl -X DELETE -d "uri=${iuri_id}" "$post_url"
    1611
    17 echo curl -X DELETE "$post_url?uri=${iuri_id}"
     12echo "    " curl -X DELETE "$post_url?uri=${iuri_id}"
    1813curl -X DELETE "$post_url?uri=${iuri_id}"
    1914
    20 
    21 echo ""
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/IMPORT.sh

    r38281 r38294  
    4141
    4242
    43 echo ""
    4443echo "****"
    45 echo "****"
    46 echo "Before running ./BUILDCOL.sh consider whether you want to 'hard-reset' "
    47 echo "the triplestore:"
    48 echo "    ./RESET-ANNOTATION-STORE.sh"
    49 echo "****"
     44echo "* Next run ./BUILDCOL.sh"
    5045echo "****"
    5146echo ""
     47
     48#echo ""
     49#echo "****"
     50#echo "****"
     51#echo "Before running ./BUILDCOL.sh consider whether you want to 'hard-reset' "
     52#echo "the triplestore:"
     53#echo "    ./RESET-ANNOTATION-STORE.sh"
     54#echo "****"
     55#echo "****"
     56#echo ""
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/INDEX-IIIF-MANIFEST.sh

    r38281 r38294  
    4848iuri="$gs_library_url/sites/$site/collect/$col/tmp/doc-openannotation--with-otherContent--pid$pid.json"
    4949
    50 #internal_url_base="http://localhost:4343/simpleAnnotationStore"
    5150internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore"
    5251
     
    6059
    6160if [ $? = 0 ] ; then
     61    echo "For debugging purposes, supressing removal of tmp/doc-openannotation--with-otherContent--pid$pid.json"
    6262    /bin/rm tmp/doc-openannotation--with-otherContent--pid$pid.json
    6363fi
     
    6565echo ""
    6666
    67 # The above curl POST returns JSON output of the form:
    68 #   {"loaded":{"short_id":"f3bac06f17c9240b76b082dbdcbb365a","uri":"http://ld.greenstone.org/intermuse/programmes/HASH012cd965c3e83d504f4a78cd/manifest"}}
     67# When the IIIFManifest file is ingested, the returned JSON includes the 'short_id' for the
     68# submitted file.  This is a value that a built Greenstone collection needs to know to
     69# use Mirador's search within-the-document, but produced at this stage is too late
     70# to be incorporated. The solution to this has been to look into how SAS calculates
     71# this short_id value, and encode the same calculation into the GoogleVisionAPI plugin
     72# so the same value can be computed there (when it is generating OpenAnnotations, and
     73# storing them as associated files), with the computed value set as the metadata field
     74# SASShortID
    6975
    70 # It might be the short_id is need for a later step in Greenstone, a comment to this affect was left in this script:
     76
     77# In more detail ...
    7178#
    72 #    The short_id is needed to ...
     79# To search within specific IIIFManafest, the SAS Search endpoint makes use of a field
     80# called 'short_id'.  This turns out to be an MD5 hash of the URL, and is done so the
     81# Restful URL to query the document specifies the
     82
     83# For example the Doc ID:
     84#    http://ld.greenstone.org/intermuse/demo-localhost/HMS_1/canvas/1
    7385#
    74 # However no other detail given, and at present the features that are needed in Mirador appear to work OK
     86# gets hashed to 212807d9741cd2497368dee6c16f2882
    7587#
    76 # Legacy comment written during a development phase that is no longer relevant/required??
     88# and so is then searched through SAS as:
     89#
     90# http://localhost:8383/simpleAnnotationStore/search-api/212807d9741cd2497368dee6c16f2882/search?q=SOUL
    7791
    78 # {"loaded":{"short_id":"e2465cd7e5174f2720cee110d9b4a06a","uri":"http://ld.greenstone.org/intermuse/programmes-and-performers/HASH012cd965c3e83d504f4a78cd/manifest"}}+ echo ''
     92
     93# So Greenstone3's XSL presentation layer can correctly construct the URL to search within
     94# the Mirador viewer using the SAS search endpoint, it need to set this short_id as a piece
     95# of metadata (SASShortID).
     96#
     97# This is done in the GoogleVisionAPI Plugin, 'replicating' (computing up-stream, really)
     98# the MD5 hash calculation that SAS also does at this point, when the IIIFManifest is ingested
     99
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/SUBMIT-ALL-OPENANNOTATION-LISTS.sh

    r38240 r38294  
    11#!/bin/bash
    22
    3 oalist_files=`find archives -name "openannotation-list*.json" -print`
    4 #oalist_files=`find archives/HMS_2.dir/ -name "openannotation-list*.json" -print`
     3
     4# In overview:
     5#
     6# For each document that contains an OpenAnnotation associated file(s):
     7#
     8#     For each new page (i.e., currently in archives)
     9#       Add the newly formed openannotation-list<page-num>.json that is in 'archives'
    510
    611
    7 echo ""
    8 echo "Deleting any existing IDs"
    9 for oalist_file in $oalist_files ; do       
    10     echo "  $oalist_file"
    11 
    12     oal_resource_ids=`./oalist-resoure-ids.py $oalist_file`
    13 
    14     for oal_resource_id in $oal_resource_ids ; do
    15     echo "    $oal_resource_id"
    16     ./DELETE-OPENANNOTATION-LIST.sh $oal_resource_id
    17     done
    18          
    19 done
    20 
    21 echo "Done deleting any previous existing IDs ... moving on to submitting annotation IDs"
    22 sleep 2
    23 
     12new_oalist_files=`find archives -name "openannotation-list*.json" -print`
    2413
    2514echo ""
    2615echo "Populating with new versions of OpenAnnotation-List JSON files"
    2716
    28 for oalist_file in $oalist_files ; do
    29     echo $oalist_file
    30     ./SUBMIT-OPENANNOTATION-LIST.sh $oalist_file
    31 
     17for oalist_file in $new_oalist_files ; do
     18    echo "  " $oalist_file
     19    ./POPULATE-OPENANNOTATION-LIST.sh $oalist_file
    3220done
    3321
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/SUBMIT-OPENANNOTATION-LIST.sh

    r38240 r38294  
    44
    55
    6 #iuri_prefix=http://localhost:4343/greenstone3/library/sites/intermuse/collect/$col/index/assoc/
    76iuri_prefix=$gs_library_url/sites/$site/collect/$col/index/assoc/
    87
    9 ifilename=${1:-archives/HASH012c.dir/openannotation-list.json}
     8ifilename=$1
    109
    1110iuri_tail=${ifilename#archives/}
     
    1312iuri="${iuri_prefix}${iuri_tail}"
    1413
    15 
    16 #internal_url_base="http://localhost:4343/simpleAnnotationStore/annotation"
    1714internal_url_base="http://localhost:$gs_http_port/simpleAnnotationStore/annotation"
    18 
    1915post_url="${internal_url_base}/populate"
    2016
    2117
    22 echo ""
     18#echo curl -X POST -d "uri=${iuri}" "$post_url"
     19#curl -X POST -d "uri=${iuri}" "$post_url"
    2320
    24 echo curl -X POST -d "uri=${iuri}" "$post_url"
    25 curl -X POST -d "uri=${iuri}" "$post_url"
     21echo "    " curl -X POST -H \'Content-Type: text/plain\' -d \"@$ifilename\" $post_url
     22curl -X POST -H 'Content-Type: text/plain' -d "@$ifilename" $post_url
    2623
    27 echo ""
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/demo-localhost/etc/collectionConfig.xml

    r38250 r38294  
    298298
    299299    <search type="jenaTDB" orthogonal="true"/>
    300 
     300    <!--
     301    <search type="sasOpenAnnotation" orthogonal="true"/>
     302    -->
     303    <!--
     304    <search type="sasIIIFManifest"   orthogonal="true"/>
     305    -->
    301306   
    302307    <infodb type="jdbm"/>
Note: See TracChangeset for help on using the changeset viewer.