Jump to content

User:Bamyers99/TemplateParametersTool: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
added Transclusion reporting section
template parameters tools moved to new website
Line 1: Line 1:
{{Notice|The template parameters tool has been moved to a new [https://bambots.brucemyers.com/TemplateParam.php website] due to the unreliability of Toolforge and inadequate tech support.}}
The '''Template Parameters tool''' gives a breakdown of template parameter usage. It uses [[Wikipedia:TemplateData|TemplateData]] to determine template parameter configuration.
The '''Template Parameters tool''' gives a breakdown of template parameter usage. It uses [[Wikipedia:TemplateData|TemplateData]] to determine template parameter configuration.


Line 6: Line 7:
Example: {{tl|BS-map}}
Example: {{tl|BS-map}}


* The [https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace=10&name=BS-map Template transclusion count tool] shows many more transclusions than the [https://tools.wmflabs.org/bambots/TemplateParam.php?wiki=enwiki&template=BS-map Template parameters tool].
* The [https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace=10&name=BS-map Template transclusion count tool] shows many more transclusions than the [https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=BS-map Template parameters tool].
* [[MiamiCentral]] directly transcludes BS-map, so it is reported by the Template parameters tool.
* [[MiamiCentral]] directly transcludes BS-map, so it is reported by the Template parameters tool.
* [[Finningley railway station]] indirectly transcludes BS-map via {{tl|Doncaster to Lincoln Line}}, so it is not reported by the Template parameters tool.
* [[Finningley railway station]] indirectly transcludes BS-map via {{tl|Doncaster to Lincoln Line}}, so it is not reported by the Template parameters tool.
Line 43: Line 44:


==External links==
==External links==
* [https://tools.wmflabs.org/bambots/TemplateParam.php Template Parameters tool]
* [https://bambots.brucemyers.com/TemplateParam.php Template Parameters tool]


===Source code===
===Source code===

Revision as of 15:06, 22 March 2019

The Template Parameters tool gives a breakdown of template parameter usage. It uses TemplateData to determine template parameter configuration.

Transclusion reporting

Only templates that are directly transcluded in an article/file are reported. Indirect transclusions via other templates are not reported.

Example: {{BS-map}}

Tool configuration

This provides additional template parameter configuration that TemplateData does not provide.
The {{tlp}} template is used to specify a configuration. The first parameter is the template to configure.

{{tlp}} parameter format

configuration type:field name{{=}}<nowiki>configuration data</nowiki>

configuration type

  • regex: Perl Compatible Regular Expression to validate template parameter value against. Note: this has been requested per T125101.
  • values: enumerated values to validate template parameter value against, separated by ;. Note: this is being added per T53375.
  • wikidata: wikidata property id. Note: proposal filed at Wikipedia talk:TemplateData.
  • yesno: yes/no field using {{yesno}}. There is no configuration data.

field name

This is the main field name as specified in the TemplateData definition for the template.
Aliases will automatically be handled properly.

Templates

  • {{Convert|values:adj=j;mid;on;pre;ri0;ri1;ri2;ri3|values:abbr=in;off;none;on;out;unit;values;~|values:disp=b;sqbr;br;comma;or;number;output number only;out;output only;preunit;table;tablecen;unit;unit2;x|values:comma=5;gaps;gaps5;off|values:lk=in;on;off;out|values:order=flip|values:round=5;25;each|values:sortable=in;on;out|values:sp=us|values:spell=in;In;on;On}}
  • {{Coord|values:format=dec;dms;hidden|values:8=E;W}}
  • {{Google Scholar id|wikidata:id=P1960|regex:id=.{12}}}
  • {{IBDB name|wikidata:id=P1220|regex:id=[1-9][0-9]*}}
  • {{IMDb name|regex:id=(nm)?\d{7}|values:section=award;awards;bio;biography|wikidata:id=P345}}
  • {{IMDb title|regex:id=(tt)?\d{7}|values:section=award;awards|wikidata:id=P345}}
  • {{Infobox NRHP|values:nrhp_type=nrhp;nhl;hd;nhld;cp;nhldcp;indcp;nmon;nhs;nmem;nhp;nb;nmp;nbp;nbs;nhr;formerihs;formernrhp;formernhl;formerhd;formernhld;formercp;formernhldcp;formerindcp;formernmon;formernhs;formernmem;formernhp;formernb;formernmp;formernbp;formernbs;formernhr;formerihs;formernrhp}}
  • {{Italic title|yesno:all}}
  • {{Nihongo|yesno:lead}}
  • {{Soccerway|wikidata:id=P2369|regex:id=[a-z\-]+[a-z]\-?/\d+/?}}

Source code