Module:Igenmod/doc: Difference between revisions
From Neodyland Wiki
More actions
m +function |
m 27 revisions imported |
||
| (20 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
This module contains | <includeonly>{{Module rating|r}}{{Heavily used module|very}}</includeonly>This module contains the functions needed by {{T0|Image generation}}, and other templates and modules | ||
<pre> | <pre> | ||
* {{#Invoke:Igenmod|wrkdate}} | * {{#Invoke:Igenmod|wrkdate}} returns the <s>"creation date"</s> of a file, the value given to the date parameter, yyyy-mm-dd | ||
* {{#Invoke:Igenmod|exttext}} | * {{#Invoke:Igenmod|invdate}} returns the <s>"creation date"</s> inverted: a string 20301231 - yyyymmdd | ||
* {{#Invoke:Igenmod|extcode}} | * {{#Invoke:Igenmod|exttext}} returns the file extension uppercased | ||
* {{#Invoke:Igenmod|extcode}} returns either "s" for SVG, "n" for anything else | |||
* {{#Invoke:Igenmod|default}} returns either "v" for SVG, "n" for anything else | |||
* {{#Invoke:Igenmod|unspec }} returns nothing for SVG, "n" for anything else | |||
* {{#Invoke:Igenmod|categ }} returns either "SVG" for SVG, "PNG" for anything else | |||
* {{#Invoke:Igenmod|split }} transcludes the template of parm2 (def: cbox) with the "/"-split values of parm1 | |||
* {{#Invoke:Igenmod|c_split}} transcludes the template of parm1 with every value of the "/"-splitting of parm2 | |||
* {{#Invoke:Igenmod|g_split}} "/"-splitting of parm1, can handle an erroneous "?" in location parms | |||
* {{#Invoke:Igenmod|q_split}} "/"-splitting of parm1, handles named parameters (for Igen) with "~"-splitting | |||
* {{#Invoke:Igenmod|t_split}} "/"-splitting of parm1, transcludes the 1st split of parm1 with all the other values | |||
* {{#Invoke:Igenmod|subst }} returns the input text with eventually the first character substitited | |||
* {{#Invoke:Igenmod|gsubst }} returns the input text with all occurrences of "/" replaced by "|" | |||
* {{#Invoke:Igenmod|catsort}} returns gsubstet linefeeds replaced by categories | |||
* {{#Invoke:Igenmod|dotrepl}} returns the input text with eventually the last character substitited | |||
* {{#Invoke:Igenmod|remprf }} returns the input text with eventually a special prefix removed | |||
elseif mw.ustring.sub (gpar[1], 1, 1) == '_' then | |||
return ' ' .. mw.ustring.sub (gpar[1], 2 ); -- leading space | |||
* {{#Invoke:Igenmod|inkscape}}special categorization for NEW Inkscape files - to find new violations | |||
------------ functions in alpha: | |||
* {{#Invoke:Igenmod|sortkey}} | * {{#Invoke:Igenmod|sortkey}} | ||
* {{#Invoke:Igenmod| | * {{#Invoke:Igenmod|getdate}} | ||
* {{#Invoke:Igenmod| | * {{#Invoke:Igenmod|sysdate}} | ||
* {{#Invoke:Igenmod|invtest}} | |||
* {{#Invoke:Igenmod|cattest}} | |||
* {{#Invoke:Igenmod| | |||
* {{#Invoke:Igenmod| | |||
* {{#Invoke:Igenmod|newfile|10}} | * {{#Invoke:Igenmod|newfile|10}} | ||
* {{#Invoke:Igenmod|compare}} | * {{#Invoke:Igenmod|compare}} | ||
</pre> | </pre> | ||
Latest revision as of 16:37, 12 August 2026
This module contains the functions needed by Image generation, and other templates and modules
* {{#Invoke:Igenmod|wrkdate}} returns the <s>"creation date"</s> of a file, the value given to the date parameter, yyyy-mm-dd
* {{#Invoke:Igenmod|invdate}} returns the <s>"creation date"</s> inverted: a string 20301231 - yyyymmdd
* {{#Invoke:Igenmod|exttext}} returns the file extension uppercased
* {{#Invoke:Igenmod|extcode}} returns either "s" for SVG, "n" for anything else
* {{#Invoke:Igenmod|default}} returns either "v" for SVG, "n" for anything else
* {{#Invoke:Igenmod|unspec }} returns nothing for SVG, "n" for anything else
* {{#Invoke:Igenmod|categ }} returns either "SVG" for SVG, "PNG" for anything else
* {{#Invoke:Igenmod|split }} transcludes the template of parm2 (def: cbox) with the "/"-split values of parm1
* {{#Invoke:Igenmod|c_split}} transcludes the template of parm1 with every value of the "/"-splitting of parm2
* {{#Invoke:Igenmod|g_split}} "/"-splitting of parm1, can handle an erroneous "?" in location parms
* {{#Invoke:Igenmod|q_split}} "/"-splitting of parm1, handles named parameters (for Igen) with "~"-splitting
* {{#Invoke:Igenmod|t_split}} "/"-splitting of parm1, transcludes the 1st split of parm1 with all the other values
* {{#Invoke:Igenmod|subst }} returns the input text with eventually the first character substitited
* {{#Invoke:Igenmod|gsubst }} returns the input text with all occurrences of "/" replaced by "|"
* {{#Invoke:Igenmod|catsort}} returns gsubstet linefeeds replaced by categories
* {{#Invoke:Igenmod|dotrepl}} returns the input text with eventually the last character substitited
* {{#Invoke:Igenmod|remprf }} returns the input text with eventually a special prefix removed
elseif mw.ustring.sub (gpar[1], 1, 1) == '_' then
return ' ' .. mw.ustring.sub (gpar[1], 2 ); -- leading space
* {{#Invoke:Igenmod|inkscape}}special categorization for NEW Inkscape files - to find new violations
------------ functions in alpha:
* {{#Invoke:Igenmod|sortkey}}
* {{#Invoke:Igenmod|getdate}}
* {{#Invoke:Igenmod|sysdate}}
* {{#Invoke:Igenmod|invtest}}
* {{#Invoke:Igenmod|cattest}}
* {{#Invoke:Igenmod|newfile|10}}
* {{#Invoke:Igenmod|compare}}