0.0.11 • Published 4 years ago

gridsome-source-wikidata v0.0.11

Weekly downloads
33
License
-
Repository
-
Last release
4 years ago

gridsome-source-wikidata

Install

  • yarn add gridsome-source-wikidata
  • npm install gridsome-source-wikidata

Usage

module.exports = {
  plugins: [
    {
      use: "gridsome-source-wikidata",
      options: {
        url: "https://query.wikidata.org/sparql",
        sparql: `SELECT DISTINCT ?item ?paintingLabel (MIN(?images) AS ?image) WHERE {
          ?painting (wdt:P31/(wdt:P279*)) wd:Q3305213;
            wdt:P170 wd:Q762;
            wdt:P18 ?images;
          BIND(REPLACE(STR(?painting), "^.*/", "") AS ?item)
          SERVICE wikibase:label {
            bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
            ?painting rdfs:label ?paintingLabel.
          }
        }
        GROUP BY ?item ?painting ?paintingLabel ?image
        LIMIT 10`,
        typeName: "Painting",
        baseDir: "/content/images/",
        verbose: "true"
      }
    },
  templates: {
    Painting: "/:item"
  }
}

Query SPARQL in Wikidata Query Service

PropertyDescriptionMandatory
urlhttps://query.wikidata.org/sparqltrue
sparqlSPARQL examplestrue
typeNameSpecify template correlationtrue
baseDirdownload file folderfalse; default: /content/
cacheFilecache file namefalse; default: .cache.json
cacheEnabledcache togglefalse; default: true
ttltime to live for cached values: ttl=0=infinitefalse; default: 24 * 60 * 60 * 1000 ms = 24h
verboseset verbose modefalse

Open issues

  • add fine grained filters for URI downloads
0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago