Module:Wikidata table/doc

MyWikiBiz, Author Your Legacy — Tuesday December 24, 2024
< Module:Wikidata table
Revision as of 08:00, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is the documentation page for Module:Wikidata table

This module creates one or more table rows where the data in each cell is taken from Wikidata.

Usage

Function makerows

This function is simple and is intended to test performance. It is unsuitable for use in articles. <syntaxhighlight lang="moin"> Lua error in Module:Wikidata_table at line 213: attempt to index field 'wikibase' (a nil value). </syntaxhighlight>

Function makerow

This function is under development for use in articles. It creates a single table row from one Wikidata entity using a given set of properties. The first cell is the label for the Wikidata entity and it is marked up as a row-header. An "editonwikidata" icon is appended to the first cell. The table caption, column headings and scopes, etc. should be supplied externally. See the examples for more detail. <syntaxhighlight lang="moin"> Lua error in Module:Wikidata_table at line 264: attempt to index field 'wikibase' (a nil value). </syntaxhighlight>

Notes
A table cell can be made up of a combination of multiple properties, qualifiers and references.
Whitespace is ignored in the list of pids.
The separator for cell values is the comma ,.
Within a cell, multiple properties are separated by the plus sign +.
Each property can be separated from one or more qualifiers by a forward-slash /.
Each qualifier is separated by a hyphen - (although any punctuation other than , + / will work).

See also