Skip to content

Commit

Permalink
Merge pull request #3 from rdf-ext/sparq-example
Browse files Browse the repository at this point in the history
chore: added sparql example
  • Loading branch information
bergos authored Feb 18, 2024
2 parents 1a69b54 + 0c37862 commit ad89513
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/query.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

CONSTRUCT {
wd:Q842945 rdfs:label ?name.
} WHERE {
wd:Q842945 rdfs:label ?name.

FILTER (LANG(?name) = "en")
}
8 changes: 8 additions & 0 deletions examples/sparql-to-turtle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

./bin/rdf-ext-cli.js \
--input-endpoint https://query.wikidata.org/sparql \
--input-query "$(cat examples/query.sparql)" \
--pretty \
--output-prefix wd=http://www.wikidata.org/entity/ \
--output-prefix rdfs=http://www.w3.org/2000/01/rdf-schema#

0 comments on commit ad89513

Please sign in to comment.