Changeset 34867


Ignore:
Timestamp:
2021-02-15T22:36:05+13:00 (3 years ago)
Author:
davidb
Message:

Tweaks after testing

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/02-EXPLODE-SPARQLRESULTS-TO-IMPORT.sh

    r34866 r34867  
    11#!/bin/bash
    22
    3 if [ ! -d tmp ] ; then
    4     echo "Making temporary directory: tmp"
    5     mkdir tmp
     3tmp_cache="tmp-cache"
     4
     5echo ""
     6
     7if [ "x$GSDL3SRCHOME" = "x" ] ; then
     8   echo "Environment variable GSDL3SRCHOME not set." 1>&2
     9   echo "Have you sourced ./gs3-setup.sh?" 1>&2
     10   exit 1
     11fi
     12   
     13if [ ! -d $tmp_cache ] ; then
     14    echo "Making temporary directory:"
     15    echo "  $tmp_cache"
     16    mkdir $tmp_cache
     17else
     18    echo "Removing existing content from:"
     19    echo "  $tmp_cache"
     20    /bin/rm -rf $tmp_cache/*
    621fi
    722
    8 echo "Creating temporary copies:"
     23echo "Copying to '$tmp_cache' then exploding:"
    924
    1025for f in "local--countries-in-esc-by-year-after-1956--with-errata.json" ; do
    1126   
    12     echo "  errata-lod/$f -> tmp/sparqlresults-$f"   
    13     /bin/cp "errata-lod/$f" "tmp/sparqlresults-$f"
     27    echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
     28    /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
     29
     30    # rm -rf tmp/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.* &&  cp import/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.json  tmp/.
     31
     32    explode_metadata_database.pl \
     33      -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
     34      -collection eurovision \
     35      -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
     36      -plugin JSONSPARQLResultPlugin  \
     37      $tmp_cache/sparqlresults-$f
     38
     39#      -use_collection_plugin_options \
     40
     41    if [ $? != 0 ] ; then
     42    echo "Error encountered when exploding:" 1>&2
     43    echo "  $tmp_cache/sparqlresults-$f" 1>&2
     44    exit 1
     45    fi
    1446done
    15    
    16 echo "Regenerating sparqlresults-* files in '../import' (from exploded results in 'tmp')"
     47
     48echo ""
     49echo "Regenerating sparqlresults-* files in '../import' (from exploded results in '$tmp_cache')"
    1750
    1851/bin/rm -rf ../import/sparqlresults-*
    19 /bin/mv tmp/sparqlresults-* ../import/.
     52/bin/mv $tmp_cache/sparqlresults-* ../import/.
    2053
    21 
     54echo ""
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/05-COPY-VOTING-METADATA-TO-IMPORT.sh

    r34865 r34867  
    22
    33
     4echo ""
    45echo "Copying:"
    56
     
    1213   
    1314
     15echo ""
    1416
    1517
Note: See TracChangeset for help on using the changeset viewer.