Last active
March 6, 2018 23:22
-
-
Save phaer/46c0fa44b0550ef5e2256eedd5495d8e to your computer and use it in GitHub Desktop.
query software versions on wikidata.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://wikidata.org/wiki/P348 https://wikidata.org/wiki/Q83, https://wikidata.org/wiki/Q13166 for a | |
# definition of the arguments. Or paste the query to https://query.wikidata.org for a nice online editor. | |
curl -sSH 'Accept: application/sparql-results+json' --data-urlencode query@- https://query.wikidata.org/sparql <<EOF \ | |
| jq '.results.bindings | map({"key": .softwareLabel.value, "value": .version.value}) | from_entries' | |
SELECT ?softwareLabel ?version WHERE { | |
?software wdt:P348 ?version; | |
FILTER ( ?software IN (wd:Q13166, wd:Q83)) | |
SERVICE wikibase:label { | |
bd:serviceParam wikibase:language "en" . | |
} | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment