Changeset 35084
- Timestamp:
- 2021-04-17T10:23:10+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/08-EXPLODE-SPOTIFY-SPARQLRESULTS-TO-IMPORT.sh
r35079 r35084 2 2 3 3 tmp_cache="tmp-cache" 4 5 cwd=`pwd` 6 cwd_without_prepare=${cwd%/*} 7 collection=${cwd_without_prepare##*/} 4 8 5 9 echo "" … … 28 32 29 33 explode_metadata_database.pl \ 34 -records_per_folder 2000 \ 30 35 -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \ 31 -collection eurovision \32 -plugin_options "-metadata_merge_on_concat_fields Country,Year ,TitleDisambiguation-OIDtype assigned -OIDmetadata Identifier" \36 -collection $collection \ 37 -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \ 33 38 -plugin JSONSPARQLResultPlugin \ 34 39 $tmp_cache/sparqlresults-$f … … 42 47 43 48 echo "" 44 echo " Regenerating sparqlresults-* files in '../import' (from exploded results in '$tmp_cache')"49 echo "Adding metadata_esc_mir_gold.xml to the sparqlresults-* directories in '../import' (from exploded results in '$tmp_cache')" 45 50 46 ##/bin/rm -rf ../import/sparqlresults-*47 51 48 for d in $tmp_cache/sparqlresults-* ; do 49 tail_d=${d##*/} 50 cat $tmp_cache/$tail_d/metadata.xml \ 51 | sed 's/"accumuate"/"override"/' > ../import/$tail_d/metadata-esc-mir-gold.xml 52 #for d in $tmp_cache/sparqlresults-* ; do 53 # tail_d=${d##*/} 54 # cat $tmp_cache/$tail_d/metadata.xml \ 55 # | sed 's/mode="accumulate"/mode="override"/' > ../import/$tail_d/metadata-esc-mir-gold.xml 56 #done 57 58 59 num_explode_subdirs=`ls -d $tmp_cache/sparqlresults-local--esc-mir-gold* | wc -l` 60 61 if [ "x$num_explode_subdirs" != "x1" ] ; then 62 echo "Error: This script is designed for all the results results from exploding to be" 1>&2 63 echo " in a single subdirectory" 1>&2 64 echo " In $tmp_cache found: $num_explode_subdirs" 1>&2 65 exit 1 66 fi 67 68 for d in ../import/sparqlresults-* ; do 69 cat $tmp_cache/sparqlresults-local--esc-mir-gold/metadata.xml \ 70 | sed 's/mode="accumulate"/mode="override"/' > $d/metadata_esc_mir_gold.xml 52 71 done 53 72 54 /bin/rm $tmp_cache/sparqlresults-*73 /bin/rm -rf $tmp_cache/sparqlresults-* 55 74 56 75 57 #/bin/mv $tmp_cache/sparqlresults-*/*.xml ../import/.58 59 76 echo ""
Note:
See TracChangeset
for help on using the changeset viewer.