Module:Import table/doc: Difference between revisions
Appearance
Content deleted Content added
→Usage: + |
|||
Line 17: | Line 17: | ||
** '' text'' - any text to import into a string datatype, e.g. <code>text-P3562</code> |
** '' text'' - any text to import into a string datatype, e.g. <code>text-P3562</code> |
||
** '' coord'' - coordinate position, inside the {{tl|coord}} template, e.g. <code>coord-P625</code> |
** '' coord'' - coordinate position, inside the {{tl|coord}} template, e.g. <code>coord-P625</code> |
||
** ''donotuse'' - indicates a column that will not be imported |
** ''donotuse'' (or any other unrecognised type) - indicates a column that will not be imported |
||
<includeonly>{{Sandbox other|| |
<includeonly>{{Sandbox other|| |
Revision as of 16:12, 2 November 2022
Usage
{{#invoke:Import table|import|page=|config=}}
This module is designed to import data from tables in Wikipedia articles into Wikidata. The first column of the table must be the name of the item.
- If this is a link (or a redirect) to an existing article which has a corresponding Wikidata item, then the data will be imported into this item.
- If the first column contains a valid identifier for a Wikidata item (e.g. Q123456) then the data will be imported into this item.
- If this is plain text or a redlink, then the data will be imported into a new Wikidata item.
Parameters
- page - the name of the article/page to parse, e.g.
|page=List of dams in South Africa
- config - details about what type of data is held in each column of the table formatted as type-property-option. Currently recognised types are:
- label - the name of the article
- wikilink - a link to an article which should be the value of the property, e.g.
wikilink-P131
- quantity - specify the unit in the third parameter, e.g.
quantity-P2048-Q11573
- year - a 4-digit year, e.g.
year-P571
- text - any text to import into a string datatype, e.g.
text-P3562
- coord - coordinate position, inside the {{coord}} template, e.g.
coord-P625
- donotuse (or any other unrecognised type) - indicates a column that will not be imported