query-3270cb445f4bb6a91ea61279e6d7d5d9

rq turtle/ttl

List of text pages in French in Category:Flora Batava - KB copy, Volume 1, 1800 SELECT ?file ?plate ?title WHERE { SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Generator" . bd:serviceParam wikibase:endpoint "commons.wikimedia.org" . bd:serviceParam mwapi:gcmtitle "Category:Flora Batava - KB copy, Volume 1, 1800" . bd:serviceParam mwapi:generator "categorymembers" . bd:serviceParam mwapi:gcmtype "file" . bd:serviceParam mwapi:gcmlimit "max" . ?title wikibase:apiOutput mwapi:title . ?pageid wikibase:apiOutput "@pageid" . } BIND(STRBEFORE(STRAFTER(?title," - Pl")," - DescriptionFR") AS ?plate) BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file) FILTER(REGEX(?title,"(DescriptionFR[0-9]+ - FloraBatava-KB-v01.jpg)$")) } ORDER BY ?plate

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#List of text pages in French in Category:Flora Batava - KB copy, Volume 1, 1800
SELECT ?file ?plate ?title
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
    bd:serviceParam mwapi:gcmtitle "Category:Flora Batava - KB copy, Volume 1, 1800" .
    bd:serviceParam mwapi:generator "categorymembers" .
    bd:serviceParam mwapi:gcmtype "file" .
    bd:serviceParam mwapi:gcmlimit "max" .
    ?title wikibase:apiOutput mwapi:title .
    ?pageid wikibase:apiOutput "@pageid" .
  }
  BIND(STRBEFORE(STRAFTER(?title," - Pl")," - DescriptionFR") AS ?plate)
  BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file)
  FILTER(REGEX(?title,"(DescriptionFR[0-9]+ - FloraBatava-KB-v01.jpg)$")) 
} ORDER BY ?plate

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?file"):::projected v3("?pageid") v4("?plate"):::projected v2("?title"):::projected c15(["max"]):::literal c11(["categorymembers"]):::literal c3(["bd:serviceParam"]):::iri c13(["file"]):::literal c9(["Category:Flora Batava - KB copy, Volume 1, 1800"]):::literal c17(["mwapi:title"]):::iri c7(["commons.wikimedia.org"]):::literal c18(["@pageid"]):::literal c5(["Generator"]):::literal f0[["regex(?title,'(DescriptionFR#91;0-9#93;+ - FloraBatava-KB-v01.jpg)$')"]] f0 --> v2 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:api"--> c5 c3 --"mwapi:endpoint"--> c7 c3 --"mwapi:gcmtitle"--> c9 c3 --"mwapi:generator"--> c11 c3 --"mwapi:gcmtype"--> c13 c3 --"mwapi:gcmlimit"--> c15 v2 --"mwapi:apiOutput"--> c17 v3 --"mwapi:apiOutput"--> c18 end bind1[/"substring-before(substring-after(?title,' - Pl'),' - DescriptionFR')"/] v2 --o bind1 bind1 --as--o v4 bind2[/"concat('https://commons.wikimedia.org/entity/M',?pageid)"/] v3 --o bind2 bind2 --as--o v4