Difference between revisions of "Template:Dump/doc"
imported>Was a bee |
imported>Was a bee |
||
| Line 17: | Line 17: | ||
|} | |} | ||
| + | Whole raw data is very long. So it is useful to render certain part of the whole tree. | ||
{| class="wikitable" | {| class="wikitable" | ||
| − | ! style ="width:500px;" | Template | + | ! style ="width:500px;" | Template syntax |
| − | ! style ="width:400px;" | | + | ! style ="width:400px;" | Usage |
|- | |- | ||
| style ="width:500px; vertical-align: top;"|[[File:Wikidata_Dump_function.svg|500px]] | | style ="width:500px; vertical-align: top;"|[[File:Wikidata_Dump_function.svg|500px]] | ||
| − | | style ="width:400px; vertical-align: top;"|{{Dump|id=Q42|claims|P856|1|mainsnak|width=400px | + | | style ="width:400px; vertical-align: top;"| |
| + | ;Input | ||
| + | <code><nowiki>{{Dump|id=Q42|claims|P856|1|mainsnak}}</nowiki></code> | ||
| + | ;Output | ||
| + | {{Dump|id=Q42|claims|P856|1|mainsnak|width=400px}} | ||
|- | |- | ||
| − | | style ="width:500px; vertical-align: top;"| | + | | style ="width:500px; vertical-align: top;"|Template syntax. |
| − | | style ="width:400px; vertical-align: top;"|Partial tree | + | | style ="width:400px; vertical-align: top;"|Partial tree. |
|} | |} | ||
| Line 41: | Line 46: | ||
<code><nowiki>{{Dump|title=Douglas Adams}}</nowiki></code> | <code><nowiki>{{Dump|title=Douglas Adams}}</nowiki></code> | ||
| + | == Test area == | ||
| + | The following is current status of {{Q|P31}} section at {{Q|Q4115189}}. | ||
| + | |||
| + | You can check how data is represented, by editing [[:d:Q4115189#P31|target section at Wikidata]] and {{Purge|purging this page}}. | ||
| + | |||
| + | <code><nowiki>{{Dump|id=Q4115189|claims|P31|height=400px}}</nowiki></code> | ||
| + | {{Dump|id=Q4115189|claims|P31|height=400px}} | ||
== See also == | == See also == | ||
Revision as of 21:59, 10 June 2018
| 40px | This is a documentation subpage for Template:Dump. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
This is wrapper template which provides easy access to Dump function defined in Module:Wikidata.
Contents
Function
This template renders raw data of Wikidata item page in JSON-like format (for details, see mw:Wikibase/DataModel/JSON) by using Lua function mw.dumpObject.
| Browser interface for Q42 | Raw data of Q42 |
|---|---|
| 400px | Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value). |
| Wikidata item page interface displayed when accessed by browser. The example item is Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q42). | Raw data of the same item page in JSON-like format (for details, see mw:Wikibase/DataModel/JSON) rendered by the code {{Dump|id=Q42}}. Real JSON format data is accessible through URL https://www.wikidata.org/wiki/Special:EntityData/Q42.json.
|
Whole raw data is very long. So it is useful to render certain part of the whole tree.
| Template syntax | Usage |
|---|---|
| 500px |
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value). |
| Template syntax. | Partial tree. |
Example
- Input
{{Dump|title=Douglas Adams|claims|P856|1|mainsnak}}
- Output
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value).
Usage
{{Dump}}
{{Dump|id=Q42}}
{{Dump|title=Douglas Adams}}
Test area
The following is current status of Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P31) section at Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q4115189).
You can check how data is represented, by editing target section at Wikidata and Script error: No such module "Purge"..
{{Dump|id=Q4115189|claims|P31|height=400px}}
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value).
See also