Changeset 34736
- Timestamp:
- 2021-01-29T14:48:41+13:00 (3 years ago)
- Location:
- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/GET-ESC-LOD.sh
r34645 r34736 21 21 22 22 23 24 # How to deal with 2 entrants specifying 2 songs ??? 25 # Could be an issue with SPARQL: e.g., see discussion 26 27 # "Constructing containers and collections" 28 # https://www.w3.org/2009/sparql/wiki/Feature:Constructing_containers_and_collections 29 30 31 # Adapted from: 32 # https://stackoverflow.com/questions/296536/how-to-urlencode-data-for-curl-command 33 34 rawurlencode() { 35 local string="${1}" 36 local strlen=${#string} 37 local encoded="" 38 local pos c o 39 40 for (( pos=0 ; pos<strlen ; pos++ )); do 41 c=${string:$pos:1} 42 case "$c" in 43 [-_.~a-zA-Z0-9\(\)] ) o="${c}" 44 ;; 45 46 " " ) o="+" 47 ;; 48 49 * ) printf -v o '%%%02X' "'$c" 50 esac 51 encoded+="${o}" 52 done 53 echo "${encoded}" 54 } 55 23 source ./_lod_utils.bash 56 24 57 25 sparql_url="https://dbpedia.demo.openlinksw.com/sparql/" -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/LOCAL-LOD-QUERY.sh
r34698 r34736 1 1 #!/bin/bash 2 2 3 input_sparql_query_file=${1:-problem-songs--using-errata.sparql} 3 4 4 s-query --service http://localhost:3030/greenstone/query "SELECT * WHERE {?s ?p ?o} $*" 5 sparql_query=`cat "$input_sparql_query_file"` 6 7 8 s-query --service http://localhost:3030/greenstone/query \ 9 "$sparql_query $*"
Note:
See TracChangeset
for help on using the changeset viewer.