Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Web tag parameters

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Web tag parameters

Post by steve »

I have just noticed that the web tag parser allows for parameters! This means that specifying the format for the date and/or time tags would be possible, e.g <#YearTempHT format=hh:mm:ss>, and Cumulus could generate the time in whatever format was specified. I was proposing to allow the format of web tag dates and times to be configurable in Cumulus, but this way is more flexible and probably easier to implement.

Does anyone have any other ideas for parameters for existing web tags, other than the date and time ones?
Steve
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Web tag parameters

Post by beteljuice »

For those that want it - could it cope with eg.
<#YearTempHT format=hh:mm ' on ' dd mmm> ?

What (if any) sort of parsing would be available for 'string' output ?

Might become a bit of a headache !
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Web tag parameters

Post by steve »

beteljuice wrote:For those that want it - could it cope with eg.
<#YearTempHT format=hh:mm ' on ' dd mmm> ?
Yes, but with spaces, it would just have to be enclosed in quotes:

<#YearTempHT format="hh:mm on dd mmm">

I'd just use the standard Delphi date/time format strings, which allow for any non-formatting text to be included.
What (if any) sort of parsing would be available for 'string' output ?
Do you have something specific in mind?
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Web tag parameters

Post by captzero »

So Steve, would last rain rain tip be something like <#LastRainTipISO format="hh:mm dd mmm yyyy"> ????

I like it.
Last edited by captzero on Wed 15 Dec 2010 12:11 pm, edited 2 times in total.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Web tag parameters

Post by nitrx »

I really don't like the words on and at in webtags because these can't be translated.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Web tag parameters

Post by steve »

captzero wrote:So Steve, would last rain rain tip be something like <#LastRainTipISO format=hh:mm ' on ' dd mmm yyyy> ????
Yes, but again, the whole parameter value would need to be in double quotes as it contains spaces:

<#LastRainTipISO format="hh:mm on dd mmm yyyy">
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Web tag parameters

Post by captzero »

nitrx wrote:I really don't like the words on and at in webtags because these can't be translated
I thought the same once I looked at it and edited my post
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Web tag parameters

Post by steve »

nitrx wrote:I really don't like the words on and at in webtags because these can't be translated.
Well, yes, that's the whole point. You put whatever you want in the parameter.
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Web tag parameters

Post by captzero »

Sounds good, I'd use it. It allows more flexibility.

I suppose PPL may also use it to display their long and lat in decimal degrees ie <#longitude=27.0004.....>
Last edited by captzero on Wed 15 Dec 2010 12:27 pm, edited 1 time in total.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Web tag parameters

Post by nitrx »

steve wrote:
nitrx wrote:I really don't like the words on and at in webtags because these can't be translated.
Well, yes, that's the whole point. You put whatever you want in the parameter.
Oh sorry I misunderstood I thougt the string was fixed :oops:
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Web tag parameters

Post by beteljuice »

Captzero - don't edit posts that have been answered - It doesn't make sense to the reader !

Steve - presumeably this can only be applied to <#webtags> that contain a single item of data ?
eg. a timestamp
... and could not be applied to something that is already a formatted construct ?

eg. "7.4 C" could NOT become "7.4 Celcius" NOR "7 C" ?
Image
......................Imagine, what you will KNOW tomorrow !
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Web tag parameters

Post by captzero »

beteljuice wrote:Captzero - don't edit posts that have been answered - It doesn't make sense to the reader !
:D Sometimes you are all just too fast for my very bad typing skills. (that took me 5 mins to type)
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Web tag parameters

Post by steve »

beteljuice wrote:eg. "7.4 C" could NOT become "7.4 Celcius" NOR "7 C" ?
I don't think there are many that are like that? The all-time record dates have 'on' and 'at' in them, and cloudbase always has ' ft' or ' m' on the end. These could become the defaults, and if a parameter was supplied, that could override the default. For example:

<#cloudbase> would give: 1020 ft
but
<#cloudbase displayunits=n> would give: 1020

You could also override the units for the data. So, if you were using Celsius in Cumulus

<#temp> would give 5.4
but
<#temp units=F> would give 41.7

Hmmm. I'm making a lot of work for myself here :bash:
Steve
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Web tag parameters

Post by captzero »

captzero wrote:Hmmm. I'm making a lot of work for myself here
Yeah... and what about wind...knots, m/s, kph, mph.

You are a glutton for punishment.
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Web tag parameters

Post by laulau »

Hi Steve,
should the new "format" option work in all time records :?:
I just unsuccesfully try this : <#TtempH format="à hh:nn le dd mmmm yyyy"> in recordT file :oops:
Laurent

Image
Post Reply