« Wikidata 1 » : différence entre les versions

De Remix Biens Communs
Aller à :navigation, rechercher
Aucun résumé des modifications
Balise : wikieditor
Aucun résumé des modifications
Balise : wikieditor
Ligne 6 : Ligne 6 :


#get_web_data:url=https://query.wikidata.org/sparql?query={{urlencode:  
#get_web_data:url=https://query.wikidata.org/sparql?query={{urlencode:  
SELECT ?Res WHERE {<http://fr.dbpedia.org/resource/Terre>  dbo:abstract ?Res .} }}
SELECT DISTINCT ?painting ?paintingLabel ?creator ?creatorLabel ( YEAR( ?inception ) as ?year ) ?genre ?genreLabel ( SUBSTR( ?str_image, 52 ) AS ?fileName )
SELECT DISTINCT ?painting ?paintingLabel ?creator ?creatorLabel ( YEAR( ?inception ) as ?year ) ?genre ?genreLabel ( SUBSTR( ?str_image, 52 ) AS ?fileName )
WHERE
WHERE
Ligne 31 : Ligne 33 :


{| class="wikitable"
{| class="wikitable"
! Name
! Résumé
! Artist
 
! Year
! Genre
! Image {{#for_external_table:<nowiki/>
{{!}}-
{{!}}-
{{!}} [{{{paintingURL}}} {{{paintingLabel}}}]
{{!}} {{{Res}}}
{{!}} [{{{creatorURL}}} {{{creatorLabel}}}]
{{!}} {{{year}}}
{{!}} {{{genre}}}
{{!}} [[File:{{{fileName}}}|80px]]
}}
}}
|}
|}

Version du 12 décembre 2022 à 09:32


SELECT+%3FRes+%7B%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fresource%2FTerre%3E++dbo%3Aabstract+%3FRes+.%7D


  1. get_web_data:url=https://query.wikidata.org/sparql?query=SELECT+%3FRes+WHERE+%7B%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fresource%2FTerre%3E++dbo%3Aabstract+%3FRes+.%7D

SELECT DISTINCT ?painting ?paintingLabel ?creator ?creatorLabel ( YEAR( ?inception ) as ?year ) ?genre ?genreLabel ( SUBSTR( ?str_image, 52 ) AS ?fileName ) WHERE {

 ?painting wdt:P180 wd:Q9482 .
 ?painting wdt:P170 ?creator .
 ?painting wdt:P571 ?inception .
 ?painting wdt:P136 ?genre .
 ?painting wdt:P18 ?image .
 BIND (STR(?image) AS ?str_image)
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

} ORDER BY ?paintingLabel }}&format=json |format=json |use jsonpath |data=paintingURL=$.results.bindings[*].painting.value, paintingLabel=$.results.bindings[*].paintingLabel.value, creatorURL=$.results.bindings[*].creator.value, creatorLabel=$.results.bindings[*].creatorLabel.value, year=$.results.bindings[*].year.value, genre=$.results.bindings[*].genreLabel.value, fileName=$.results.bindings[*].fileName.value }}

Résumé
{{{Res}}}

}}