Template:Wikidata list/doc

This manual might be out of date, please check with the master copy!

Usage
This template defines a bot-generated list based on Wikidata (original blog post). It must be "closed" with Wikidata list end; the text between these two templates will be periodically (once every 24h) replaced by the bot-generated list.

The query MUST include the  variable - do not rename it.

Example: ... (This will be overwritten by ListeriaBot) ... Wikidata list end

Parameters:
 * sparql:A SPARQL SELECT query. Needs to return  as the item number. Mandatory. See SPARQL query service examples suitable for Listeria
 * columns:Defines the columns of the list table. Allowed values are :
 * , a serial row number (per section), increasing from 1, according to the initial sorting
 * , the wiki-language-based label of the item, linked to the local article (where exists), or the Wikidata item
 * , the wiki-language-based label of the item, using the given language code (here, "xx"), as plain text
 * , the wiki-language-based list of aliases for the item, using the given language code (here, "xx"), as plain text.
 * , the manual, or auto-generated description
 * , the Q item number
 * a Wikidata property
 * , qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the Qxxx linked label and the value of Pzzz
 * , qualifier properties; for Pxxx linking to an item Qyyy and having a Pzzz qualifier, the value of Pzzz. This is a version of the above, specific for a single item; e.g., "p553/q866/p554" to get YouTube account names.
 * , a SPARQL result field name.
 * Every column can optionally have a  suffix, otherwise the Wikidata property (language) name is used. Case sensitive. Since the release of May 2021 single quotes are not supported (causes the query to fail with a "not edited" message).


 * sort:The initial sort key for the table. Valid values are:
 * , the label of the item
 * , tries to find, and sort by, the family (last) name from the label, assuming items are people. This is a heuristic and may not work properly in all cases. If possible, try to sort by P734 (family name).
 * , a Wikidata property
 * Optional


 * section:The list can be sectioned by a Wikidata property. Optional. Can be a property number (possibly prefixed by P), or a.
 * min_section:The minimum number of entries to generate a section when used together with . All other entries will be put under section "misc". Default:2. Optional
 * autolist:If description is a column but no description exists on Wikidata, "autolist=fallback" uses AutoDesc to generate one. Optional
 * language:Label/description language, if different from site language. Optional
 * thumb:The thumbnail width for images (e.g. column P18). Default:128. Optional
 * links:How to render links not in the local Wikipedia. Valid values are:
 * to link to Wikidata. Default.
 * to remove entries for which there exists no local article (the opposite of ).
 * to generate red links based on label and item.
 * to remove entries for which there exists a local article (the opposite of ).
 * to generate blue links for existing pages, and plain text otherwise.
 * to generate blue links for existing pages, and links to Reasonator otherwise.
 * Optional


 * row_template:Generates a template call rather than a table row; the template must then generate the table row in turn or the table header/footer need to be surpressed using   parameter. Parameters passed to the template are the lower-case keys from the   parameter, e.g.   or  . Optional
 * header_template:Generates a template call rather than a table header; the template must then generate the table header. No parameters are passed to this template. Recommended to be used with . Optional
 * skip_table:Suppresses the table markup completely when using . Any value will work.
 * wdedit:Generates information that allows Wikidata editing from Wikipedia using this JavaScript. Value needs to be . Does not work when   is used. Caution: This will result in larger wikitext than normal, and updates may fail because of that. Optional
 * references:Add references. Allowed value is . Requires reflist or similar somewhere in the page. Optional
 * freq:Numerical value X; wait at least X days before an automatic update. Does not affect updates via web interface. Optional
 * summary:Comma-separated list of keys to add as a summary underneath all other content. Optional
 * The total number of items (rows) in this list.


 * short:Any value ensures that the query is not displayed. Optional
 * additional:Any value ensures that the "manually update" link is not displayed. Useful for pages with several Listeria lists. Optional

Charts
Listeria can be combined with Template:Graph:Chart

Sample from Samples/charts/bar chart:

Important are "row_template", "skip_table" and the columns required by Template:Graph:Chart.

In the sample type is set to "rect". Other charts are possible (line, area, pie).

Listeria generates a single line that looks like:

This (or more recent data) renders as:

Support
To report issues or propose new ideas, click on [//github.com/magnusmanske/listeria_rs/issues Support ]