trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: January 2021

Re: [tde-users] Re: kweather does not update weather data [SOLVED]

From: deloptes <deloptes@...>
Date: Fri, 08 Jan 2021 17:57:32 +0100
Stefan Krusche via tde-users wrote:

>> What do you think?
> 
> Great! Sounds like cooperation. What else can we expect from each other
> or this community!

I think I found the source of stations.dat. What could be useful is a
mapping of countries to regions. Then weather_stations.desktop could be
generated automatically out of stations.dat.

[Main]
regions=US CA MX EU AF OZ ME AS M_ AT

in stations.dat you have

Tasiilaq;;Greenland
or
Lac Benoit;;Canada;
or
High Island;LA;United States

which becomes

[US]
name=United States
states=AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MA MD MI
MS MN MO MT NE NH NM NV NY ND NJ NC OH OK OR PA RI SC SD TN TX UT VT VA WA
WI WV WY

[EU]
name=Europe
states=AB OS BE BA BY BG CZ HR CY DK EE FI FR MK DE GI GR HU IE IS IT LV LT
LU MT MD NL NO PL PT RO RU SK SI SP SE CH TR UA UK YU

[CA]
name=Canada
states=AB BC MB NB NF NS NT ON QC SK YK


etc.

Now if we know how it maps for example
[EU_AB]
name=Albania

or

[CA_AB]
name=Alberta

we can automatically generate the locX entries for each region and country.