Module:Shindo/doc
Appearance
This is a documentation subpage for Module:Shindo. It may contain usage information, categories and other content that is not part of the original module page. |
This module depends on the following other modules: |
Description | This is the Shindo module. |
---|---|
Code source | Shindo |
Status | Beta |
Dependencies |
This is the Shindo module. Named after the Japanese term used for classifying earthquakes 震度, this module provides utility for seismic intensity scales.
Seismic intensity data generated on Module:Shindo/data. Messages on Module:Shindo/messages.
Usage
{{#invoke:Shindo|color}}
returns styling for a given seismic intensity on a scale.{{#invoke:Shindo|formatInWikitable}}
returns styled text for a given seismic intensity on a scale, best suited for a wikitable.{{#invoke:Shindo|formatTag}}
returns styled text for a given seismic intensity on a scale, as an HTML tag.{{#invoke:Shindo|format}}
returns styled text for a given seismic intensity on a scale, as an HTML tag or table, depending on whether the parameter "format" is "wikitable".{{#invoke:Shindo|convert}}
will convert a given peak ground acceleration into a seismic intensity.{{#invoke:Shindo|scale}}
returns styled text for a specific scale, while shifting all the numbered arguments left, useful for invoking within templates that give specific scales.
Parameters
scale
: Which seismic intensity scale to be used. This is the first parameter.intensity
: The seismic intensity corresponding to the first scale. This is the second parameter (or first parameter when the scale is invoked as a function). If multiple intensities are desired they should be separated with a slash (/) with no spaces between them.scale2
: If specified, a second seismic intensity scale will be shown in parentheses (but colored the same as the original). Only used when formatting as a "tag". This is the third parameter (or second parameter when the scale is invoked as a function).intensity2
: The seismic intensity corresponding to the second scale. This is the fourth parameter (or third parameter when the scale is invoked as a function).format
: Either "wikitable" or "tag".link
: Whether to link to the relevant article. Default istrue
.color
: Whether to color the box for "formatTag" and "formatInWikitable". Default istrue
. If not then there will be no additional tag and the text will be unstyled.style
: Additional styling for the wikitable/tag, formatted as inline CSS.tag
: What tag to use in "formatTag". Default is "span".tagProps
: Properties for the tag (or wikitable) entry.labelScale
: Whether to label the ranking with the name of the scale (useful when the scale is relatively unknown to most).pga
: The peak ground acceleration in theconvert
function, in %g's. Same as the second parameter.
Documentation
Package items
shindo._color(args)
(function)- Gets the inline CSS for a particular scale's intensity color
- Parameters:
- Returns: Preprocessed text output (string)
shindo._formatInWikitable(args)
(function)- Gets the format of the scale as a wikitable
- Parameters:
args
frame arguments (table)args.scale
The name of the scale (string)args.intensity
The intensity of the scale (string)args.tagProps
additional properties for the wikitable row (string)args.header
if the formatting is done as a header (boolean)args.link
whether to link to the scale page (boolean)args.labelScale
whether to include the name of the scale (boolean)
- Returns: Preprocessed text output (string)
shindo._formatTag(args)
(function)- Gets the format of the scale as a tag
- Parameters:
args
frame arguments (table)args.scale
The name of the scale (string)args.scale2
The name of a second scale (string)args.intensity
The intensity of the scale (string)args.intensity2
The intensity for the second scale (string)args.tag
Tag name (string)args.style
styling for the tag (string)args.tagProps
additional properties for the tag (string)args.color
Whether to color the entry (boolean)args.link
whether to link to the scale page (boolean)
- Returns: Preprocessed text output (string)