Changeset 34855
- Timestamp:
- 2021-02-14T15:58:30+13:00 (3 years ago)
- 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 2 2 3 3 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" 6 6 7 7 … … 9 9 10 10 echo "Generating Song (titles) problem list: problem-songs.html" 11 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem- songs.sparqlhtml11 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-lod-lists/dbpedia-problem-songs.sparql html 12 12 13 13 echo "Generating Entrant (artists) problem list: problem-entrants.html" 14 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem- entrants.sparqlhtml14 ./DBPEDIA-LOD-SPARQL-QUERY.sh problem-lod-lists/dbpedia-problem-entrants.sparql html 15 15 16 16 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 html17 #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 19 19 20 20 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 html21 #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 23 23 24 24 echo "" -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/DBPEDIA-LOD-SPARQL-QUERY.sh
r34754 r34855 24 24 25 25 sparql_url="https://dbpedia.demo.openlinksw.com/sparql/" 26 # 26 #sparql_url="https://dbpedia.org/sparql" 27 27 28 28 graph_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_safe33 29 34 30 … … 40 36 additional_args="$output_format_arg_safe&timeout=30000&signal_void=on&signal_unconnected=on" 41 37 38 tmp_table_filename="/tmp/table-sparql-result--$$.$output_ext" 42 39 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" 41 wget --no-check-certificate -O "$tmp_table_filename" "$sparql_url?$graph_arg&$query_arg_safe&$additional_args" 44 42 45 cat html-table-header.html " table-$output_result_file" html-table-footer.html > "$output_result_file"43 cat html-table-header.html "$tmp_table_filename" html-table-footer.html > "$output_result_file" 46 44 45 if [ $? = 0 ] ; then 46 /bin/rm "$tmp_table_filename" 47 else 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 50 fi 51
Note:
See TracChangeset
for help on using the changeset viewer.