A short script to replace Wikidata URLs with their label.
SELECT ?item ?pic
WHERE {
?item wdt:P31 wd:Q146 .
?item wdt:P18 ?pic
}
SELECT ?item ?pic
WHERE {
?item <instance of> <house cat> .
?item <image> ?pic
}
echo wdt:P31 | ./wikidata-label-lookup.py
To replace all URLs in current buffer:
:%!./wikidata-label-lookup.py