Changeset 34855


Ignore:
Timestamp:
2021-02-14T15:58:30+13:00 (3 years ago)
Author:
davidb
Message:

Changes after test-run

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/03-GEN-PROBLEM-LOD-LISTS.sh

    r34793 r34855  
    22
    33
    4 echo "Copying:"
    5 echo "  countries-in-esc-by-year.json -> ../import/countries-in-esc-by-year.json"
     4#echo "Copying:"
     5#echo "  countries-in-esc-by-year.json -> ../import/countries-in-esc-by-year.json"
    66
    77
     
    99
    1010echo "Generating Song (titles) problem list: problem-songs.html"
    11 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-songs.sparql html
     11./DBPEDIA-LOD-SPARQL-QUERY.sh problem-lod-lists/dbpedia-problem-songs.sparql html
    1212
    1313echo "Generating Entrant (artists) problem list: problem-entrants.html"
    14 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-entrants.sparql html
     14./DBPEDIA-LOD-SPARQL-QUERY.sh problem-lod-lists/dbpedia-problem-entrants.sparql html
    1515
    1616
    17 echo "Generating *combined* Song and Entrant problem list: problem-songs-and-entrants.html"
    18 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-songs-and-entrants.sparql  html
     17#echo "Generating *combined* Song and Entrant problem list: problem-songs-and-entrants.html"
     18#./DBPEDIA-LOD-SPARQL-QUERY.sh problem-songs-and-entrants.sparql  html
    1919
    2020
    21 echo "Generating *return path* Song and Entrant problem list: problem-return-path-songs-and-entrants.html"
    22 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-return-path-songs-and-entrants.sparql  html
     21#echo "Generating *return path* Song and Entrant problem list: problem-return-path-songs-and-entrants.html"
     22#./DBPEDIA-LOD-SPARQL-QUERY.sh problem-return-path-songs-and-entrants.sparql  html
    2323
    2424echo ""
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/DBPEDIA-LOD-SPARQL-QUERY.sh

    r34754 r34855  
    2424
    2525sparql_url="https://dbpedia.demo.openlinksw.com/sparql/"
    26 # sparql_url="https://dbpedia.org/sparql"
     26#sparql_url="https://dbpedia.org/sparql"
    2727
    2828graph_arg="default-graph-uri=http%3A%2F%2Fdbpedia.org"
    29 
    30 #query_arg_safe='query=SELECT+%3Fcountries_in_esc_by_year+%3Fcountry_in_year+%3Fyear+%3Fcountry+%3Fentrant+%3Fsong%0D%0AWHERE+{%0D%0A+%3Fcountries_in_esc_by_year+skos%3Abroader+dbc%3ACountries_in_the_Eurovision_Song_Contest_by_year.%0D%0A%0D%0A+%3Fcountry_in_year+dct%3Asubject+%3Fcountries_in_esc_by_year.%0D%0A+bind(+REPLACE(str(%3Fcountry_in_year)%2C+".*(\\d{4})"%2C+"%241")+as+%3Fyear).%0D%0A+++FILTER+(+xsd%3Ainteger(%3Fyear)+<+2020).%0D%0A%0D%0A+%3Fcountry_in_year+dbp%3Acountry+%3Fcountry.%0D%0A+%3Fcountry_in_year+dbp%3Aentrant+%3Fentrant.%0D%0A%0D%0A+%3Fcountry_in_year+dbp%3Asong+%3Fsong.%0D%0A%23+%3Fsong+rdfs%3Alabel+%3Fsong_label%0D%0A%23+++FILTER+(lang(%3Fsong_label)+%3D+"en").%0D%0A%0D%0A%0D%0A}%0D%0AORDER+BY+DESC(%3Fcountries_in_esc_by_year)'
    31 #echo "query arg safe ="
    32 #echo $query_arg_safe
    3329
    3430
     
    4036additional_args="$output_format_arg_safe&timeout=30000&signal_void=on&signal_unconnected=on"
    4137
     38tmp_table_filename="/tmp/table-sparql-result--$$.$output_ext"
    4239
    43 wget --no-check-certificate -O "table-$output_result_file" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
     40#wget --no-check-certificate -O "table-$output_result_file" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
     41wget --no-check-certificate -O "$tmp_table_filename" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args"
    4442
    45 cat html-table-header.html "table-$output_result_file"  html-table-footer.html > "$output_result_file"
     43cat html-table-header.html "$tmp_table_filename"  html-table-footer.html > "$output_result_file"
    4644
     45if [ $? = 0 ] ; then
     46    /bin/rm "$tmp_table_filename"
     47else
     48    echo "Failed to concatenate header+table+footer to create: $output_result_file" 1>&2
     49    echo "Leaving temporaryly generated table file for inspection: $tmp_table_filename" 1>&2
     50fi
     51
Note: See TracChangeset for help on using the changeset viewer.