started |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
Images can in principle be displayed via code like | Images can in principle be displayed via code like | ||
<pre>[[File: | <pre>[[File:Wikipedia-Marker-commons.svg|thumb|A picture from Wikimedia Commons embedded in this Wiki]]</pre> | ||
This assumes that [https://www.mediawiki.org/wiki/InstantCommons InstanctCommons] is enabled on this wiki and that a file with that file name actually exists on Wikimedia Commons (as it [ does] in the case of the example given above). | This assumes that [https://www.mediawiki.org/wiki/InstantCommons InstanctCommons] is enabled on this wiki and that a file with that file name actually exists on Wikimedia Commons (as it [https://commons.wikimedia.org/wiki/File:Melissa_Little_2017-002.jpg does] in the case of the example given above). | ||
== Example image == | == Example image == | ||
[[File: | [[File:Wikipedia-Marker-commons.svg|thumb|A picture from Wikimedia Commons embedded in this Wiki]] | ||
== Example queries == | |||
* [https://query.portal.mardi4nfdi.de/#%23%20This%20query%20produces%20statements%20for%0A%23%20https%3A%2F%2Fquickstatements.portal.mardi4nfdi.de%2F%23%2Fbatch%2Fnew%0A%23%20Help%3A%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FHelp%3AQuickStatements%20.%0A%0A%23defaultView%3AImageGrid%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fprop%2Fdirect%2F%3E%0APREFIX%20wd%3A%20%3Chttps%3A%2F%2Fportal.mardi4nfdi.de%2Fentity%2F%3E%0A%0APREFIX%20wikidata_wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2F%3E%0APREFIX%20wikidata_wdt%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fdirect%2F%3E%0A%0ASELECT%20DISTINCT%0A%0A%23%23%23%23%23%23%23%0A%23%20To%20get%20the%20QuickStatements%20commands%2C%20comment%20out%20the%20lines%20until%20the%20next%20hash%20line%0A%23%20%3Fmardi_item%0A%23%20%3Fmardi_item_label%0A%23%20%3Fwikidata%0A%23%20%3Fwikidata_label%0A%23%20%3FDOI%0A%23%23%23%23%23%23%23%0A%3Fimage%20%0A%23%20%28REPLACE%28STR%28%3Fmardi_item%29%2C%20%22.%2aQ%22%2C%20%22Q%22%29%20AS%20%3Fmardi_qid%29%20%0A%23%20%28%22P12%22%20AS%20%3Fproperty%29%0A%23%20%28CONCAT%28%22%5C%22%22%2C%20REPLACE%28STR%28%3Fwikidata%29%2C%20%22.%2aQ%22%2C%20%22Q%22%29%2C%20%22%5C%22%22%29%20AS%20%3Fwikidata_qid%29%20%0A%0AWHERE%20%7B%0A%23%20%20%20SERVICE%20bd%3Asample%20%7B%20%3Fmardi_item%20wdt%3AP12%20%3FWikidataQID%20.%20bd%3AserviceParam%20bd%3Asample.limit%201000%20%7D%0A%23%20%20%20%3Fmardi_item%20wdt%3AP31%20wd%3AQ57162%20.%0A%20%20%20%20wd%3AQ1750647%20wdt%3AP12%20%3FWikidataQID%20%20.%0A%23%20%20%20BIND%28URI%28STR%28CONCAT%28wikidata_wd%3A%2C%20%3FWikidataQID%29%29%29%20AS%20%3Fwikidata%29%0A%23%20%20BIND%28URI%28STR%28CONCAT%28wikidata_wd%3A%2C%20%22Q41179909%22%29%29%29%20AS%20%3Fwikidata%29%0A%20%20BIND%28URI%28%22http%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ41179909%22%29%20AS%20%3Fwikidata%29%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20service%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%23%20%20%20%20%20%3Fwikidata%20wikidata_wdt%3AP496%20%3Forcid%20.%0A%20%20%20%20%3Fwikidata%20wikidata_wdt%3AP18%20%3Fimage%20.%0A%23%20%20%20%20%20%3Fwikidata%20rdfs%3Alabel%20%3Fwikidata_label%20.%0A%23%20%20%20%20%20FILTER%20%28LANG%28%3Fwikidata_label%29%20%3D%20%22en%22%29%0A%20%20%7D%0A%23%20%20%20%3Fmardi_item%20rdfs%3Alabel%20%3Fmardi_item_label%20.%0A%23%20%20%20FILTER%20%28LANG%28%3Fmardi_item_label%29%20%3D%20%22en%22%29%0A%7D%0ALIMIT%2010 For a given MaRDI QID, check the corresponding Wikidata item for an image] |
Latest revision as of 17:07, 19 August 2024
About
This page helps me explore how to use images via queries.
Basics
Images can in principle be displayed via code like
[[File:Wikipedia-Marker-commons.svg|thumb|A picture from Wikimedia Commons embedded in this Wiki]]
This assumes that InstanctCommons is enabled on this wiki and that a file with that file name actually exists on Wikimedia Commons (as it does in the case of the example given above).