diff options
author | Emanoil Kotsev <deloptes@gmail.com> | 2021-01-07 16:29:35 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-01-24 14:29:38 +0100 |
commit | f48efce5614763d16beeb150af1a4eb030148b38 (patch) | |
tree | 558bf14fd1801a4c257e5185a7e9b30a432215cb /kweather/CMakeLists.txt | |
parent | f89d317e769be7af5399d7d52d3b0d3099c7d025 (diff) | |
download | tdetoys-f48efce5614763d16beeb150af1a4eb030148b38.tar.gz tdetoys-f48efce5614763d16beeb150af1a4eb030148b38.zip |
kweather: Improve station list processing
+ Add a README file with information about the processing stations
+ Automatically generate stations.dat and weather_stations.desktop
from data/nsd_cccc.txt before cmake checks
+ File downloaded from https://tgftp.nws.noaa.gov/data/nsd_cccc.txt
+ Clean up weather_stations.desktop.in and moved relevant information
to data/station_names.txt
+ Added GG to EU and NU, PE to Canada
+ Mapped most of African countries to AF region
+ Mapped few other countries to their regions
+ Algeria is not in the ME region
+ Christmas Islands code is CX
+ Added Greenland to Atlantic
+ Added some more states to Oceania
+ Added some more states to Cenetral and South Americas
+ Antarctica as new region
+ Renamed Australiasia to Australia and Oceania
+ Region abbreviations in alphabetic order
+ Removed Atlantic and Mexico regions and added North America
+ Mapped most of the outstanding stations in Canada and elsewhere
+ J Leslie Turriff provided information on the stations in Canada
Signed-off-by: Emanoil Kotsev <deloptes@gmail.com>
Modify the generation of weather_stations.desktop so that it is possible
to merge translations into a generated file.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kweather/CMakeLists.txt')
-rw-r--r-- | kweather/CMakeLists.txt | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/kweather/CMakeLists.txt b/kweather/CMakeLists.txt index 1be2418..075266b 100644 --- a/kweather/CMakeLists.txt +++ b/kweather/CMakeLists.txt @@ -45,6 +45,21 @@ tde_add_executable( kweatherservice AUTOMOC ) +##### generate stations.dat and weather_stations.desktop + +if( NOT PERL_EXECUTABLE ) + include( FindPerl ) +endif( ) + +execute_process( + COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/genstations.pl + ${CMAKE_CURRENT_SOURCE_DIR}/data/nsd_cccc.txt + ${CMAKE_CURRENT_SOURCE_DIR}/data/station_names.txt + ${CMAKE_CURRENT_SOURCE_DIR}/weather_stations.desktop.in + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) + + ##### sun_test (test) ########################### # FIXME: add correct test targets support # @@ -118,13 +133,14 @@ tde_install_icons( kweather ) ##### other data ################################ tde_create_translated_desktop( - SOURCE weather_stations.desktop + SOURCE ${CMAKE_CURRENT_BINARY_DIR}/weather_stations.desktop KEYWORDS name DESTINATION ${DATA_INSTALL_DIR}/kweatherservice PO_DIR kweather-stations ) -install( FILES stations.dat +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/stations.dat DESTINATION ${DATA_INSTALL_DIR}/kweatherservice ) |