Webtags/Parameters (preserving history): Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m
→‎Input modification Parameters: added beware taken from a forum post in July 2012
m (→‎Input modification Parameters: added beware taken from a forum post in July 2012)
(3 intermediate revisions by the same user not shown)
 
==What is a web tag? ==
{{TOCright}}
 
Put simply, a [[Webtags|web tag]] is included in a [[Cumulus template file]] to indicate where Cumulus should insert values when it [[Customised_templates#What_is_meant_by_.27Cumulus_processes_templates.27|processes that template]] and produces an output file. A '''Cumulus Template File''' is the name given by Steve Loft to any files that contain web tags, and need to be processed before they actually include values.
 
== What is a web tag parameter?==
 
 
{{TOCright}}
Now we get to the terminology for what this Wiki page will document.
 
* An input parameter is used where the same web tag can represent a value for a number of different past time instants.
* Each of those past time instants is represented by a different value for the input parameter.
* So a combination of web tag name and input modification parameter lets Cumulus to pickselect the value you want to see.
* The web tags that can use input modification parameters will depend on which Cumulus release you are using
* To supply both optional input modification, and optional output modification parameters, separate them with spaces, e.g. <#ByMonthTempHT mon=7 format=hh:nn>. In that example, the time only is returned for the highest ever temperature in July, after processing by Cumulus of the time-stamp web tag.
* The list of recent history web tags available has not changed between last Cumulus 1 release and any MX release.
* Any new derivatives introduced by MX, will have current value web tags, and may have tags for extremes this month, extremes this year, all-time extremes, and monthly-all-time-extremes but do not have equivalent new recent history tags.
'''Beware: If you use <code><#RecentRainToday d=2></code> remember that rainfall can accumulate during a day, so "d=2" returns an estimate of the rain between rollover 2 days ago and the same time as now 48 hours ago, it does not return the total rainfall 2 days ago!'''
|-
| [[Webtags#Monthly_All_Time_Records|'''monthly all-time extreme records''']]
|rc=n
|This is the default, so does not need to be specified. The output from the web tag will use either decimal comma or decimal point as specified by the locale in which MX is running
| Both <#tempYH> and <#tempYH rc=n> will return yesterday's highest temperature using what is specified by locale to separate integer and decimal parts
|-
|rc=y
|the attribute '''rc''' takes the value 'y' to replace any commas defined by the locale with full stops to separate integer and decimal parts of the output value.
| <#tempYH rc=y> will return yesterday's highest temperature as integer part then full stop then decimal part, regardless of local
|}
 
5,838

edits

Navigation menu