Jump to content

Module:Import table/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Parameters: +coord
Line 13: Line 13:
** '' year'' - a 4-digit year, e.g. <code>year-P571</code>
** '' year'' - a 4-digit year, e.g. <code>year-P571</code>
** '' text'' - any text to import into a string datatype
** '' text'' - any text to import into a string datatype
** '' coord'' - coordinate position, inside the {{tl|coord}} template
** ''donotuse'' - indicates a column that will not be imported
** ''donotuse'' - indicates a column that will not be imported



Revision as of 16:35, 1 November 2022


Usage

{{#invoke:Import table|import|page=|config=}}

This module is designed to import data from tables in Wikipedia articles into Wikidata. It is a work in progress.

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
    • coord - coordinate position, inside the {{coord}} template
    • donotuse - indicates a column that will not be imported