havanagrawal / wikidata-toolkit

Bot for Wikidata to fix consistency and constraint issues on television series :tv:
MIT License
5 stars 8 forks source link

Autogenerate the properties file #1

Open havanagrawal opened 5 years ago

havanagrawal commented 5 years ago

There must be a sub-library in pywikibot that performs the same functionality as WikidataProperty. If not, find a way to auto-generate the Python3 file

Could use this query:

SELECT ?property ?propertyLabel WHERE {
  ?property wikibase:propertyType ?propertyType .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ASC(xsd:integer(STRAFTER(STR(?property), 'P')))

Try It