Module wikitrek-FunzioniGeneriche
Returns the color to use in CSS for the text depending on the luminance of the background
Functions
p.TestArray (frame) | Test function for array manipulation |
p.TestSpaces (frame) | Test function for spaces identifiaction using regex |
p.ShipName (frame) | Extract the name of a ship from its full designation |
p.ShipNameCore (designation) | Extract the name of a ship from its full designation |
p.SortedPropertiesList (frame) | Test function to check properties sorting |
p.ParameterToSemantic (frame) | Process the value assigned to parameter of the "old"-style template (pre-DataTrek) to sanitize it and pass it as clean value to SMW property using the #set function |
p.PerformersToSemanticOriginal (frame) | OLD simpler original version Process the value assigned to "EpisodioPersonaggi" of the "old-style" template (pre-DataTrek) to sanitize it and pass it as clean value to SMW property using the #set function |
p.PerformersToSemantic (frame) | NEW improved version Process the values assigned to "EpisodioPersonaggi" parameter of the "old-style" template (pre-DataTrek) to sanitize it and pass it as clean value to SMW property using the #set function |
p.SVGValidate (frame) | Check if a file is SVG and validate it |
Functions
- p.TestArray (frame)
-
Test function for array manipulation
Parameters:
- frame The interface to the parameters passed to {{#invoke:}}
Returns:
-
Processed string
- p.TestSpaces (frame)
-
Test function for spaces identifiaction
using regex
Parameters:
- frame The interface to the parameters passed to {{#invoke:}}
Returns:
-
Processed string
- p.ShipName (frame)
-
Extract the name of a ship from its full designation
Parameters:
- frame The interface to the parameters passed to {{#invoke:}}
Returns:
-
Bare name of the ship
- p.ShipNameCore (designation)
-
Extract the name of a ship from its full designation
Parameters:
- designation The full designation to process
Returns:
-
Bare name of the ship
- p.SortedPropertiesList (frame)
-
Test function to check properties sorting
Parameters:
- frame The interface to the parameters passed to {{#invoke:}}
Returns:
-
Comma-separated list of properties
- p.ParameterToSemantic (frame)
-
Process the value assigned to parameter of the "old"-style template
(pre-DataTrek) to sanitize it and pass it as clean value to
SMW property using the #set function
Parameters:
- frame The interface to the parameters passed to {{#invoke:}} No return @return Sanitized string representing one or more property values
- p.PerformersToSemanticOriginal (frame)
-
OLD simpler original version
Process the value assigned to "EpisodioPersonaggi" of the "old-style"
template (pre-DataTrek) to sanitize it and pass it as clean value to
SMW property using the #set function
Parameters:
- frame The interface to the parameters passed to {{#invoke:}} No return @return Sanitized string representing one or more property values
- p.PerformersToSemantic (frame)
-
NEW improved version
Process the values assigned to "EpisodioPersonaggi" parameter of the
"old-style" template (pre-DataTrek) to sanitize it and pass it
as clean value to SMW property using the #set function
Parameters:
- frame The interface to the parameters passed to {{#invoke:}} No return @return Sanitized string representing one or more property values
- p.SVGValidate (frame)
-
Check if a file is SVG and validate it
Parameters:
- frame The interface to the parameters passed to {{#invoke:}}
Returns:
-
Processed string