view config.fetch_weather.example @ 438:a17b7fdd03c0

fetch_weather: Simplify and check for existence of output file before trying to read the old one.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 07 Feb 2017 10:35:11 +0200
parents bc7746ca622e
children ba559d5d44db
line wrap: on
line source

###
### Example configuration for weather.tcl data fetcher
### script fetch_weather.pl.
###

##
## Purge time threshold for old/obsolete records.
## Fetch_weather stores data into a cache file, which
## also keeps older records as sometimes weather stations
## do not report reliably. However, too old records
## need to be purged. This setting sets the threshold
## time in MINUTES (default is 60 minutes)
##
purge_threshold = 60


##
## Enable/disable data scraping from Tiehallinto's WWW-pages
##
opt_tiehallinto = 1

## Tiehallinto static meta data file + path
tiehallinto_static_meta = "/some/path/weather.tiehallinto.meta"

##
## Enable/disable open data access from FMI
## You will need to obtain an API key, refer to
## https://ilmatieteenlaitos.fi/avoin-data
##
opt_fmi = 0
fmi_api_key = ""

##
## Debug mode, outputs some stuff sometimes maybe
##
debug = 1

##
## Path to the output file, should be same as set in weather.tcl
## If NOT set, the script will output to stdout.
##
outfile = "/some/path/weather.data"

##
## HTTP user agent. If not set here, default will be used.
##
#http_user_agent = "Mozilla/5.0 (foobar)"