From: Alexander Vasarab Date: Tue, 30 Jun 2020 18:03:08 +0000 (-0700) Subject: Change around and rename some config parameters X-Git-Tag: v2.0.0^2~25 X-Git-Url: https://wylark.com/src/infoex-autowx.git/commitdiff_plain/ba6732e032b7ddd842476696e090c9140e961346?ds=inline Change around and rename some config parameters --- diff --git a/.gitignore b/.gitignore index 0a764a4..6c5d96f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ env +.CSV diff --git a/README.md b/README.md index 4433828..fc9d6ae 100644 --- a/README.md +++ b/README.md @@ -62,16 +62,16 @@ values. The [ftp] values describe your credentials for the InfoEx automated weather station FTP server. -`[wxsite]` +`[nrcs]` `station_triplet = [The NRCS identifier for a particular SNOTEL site]` `desired_data = [A comma-delimited list of NRCS elements you're interested in]` -`location_uuid = [The UUID used by InfoEx to identify your automated Wx site]` -`csv_filename = [Arbitrary name of the file that will be uploaded to InfoEx]` -`[ftp]` +`[infoex]` `host = [InfoEx FTP host address]` `uuid = [InfoEx-supplied UUID]` `api_key = [InfoEx-supplied API Key]` +`csv_filename = [Arbitrary name of the file that will be uploaded to InfoEx]` +`location_uuid = [The UUID used by InfoEx to identify your automated Wx site]` Finding Your WXSITE values -------------------------- diff --git a/config-nrcs.ini.example b/config-nrcs.ini.example index 018a6fc..449132e 100644 --- a/config-nrcs.ini.example +++ b/config-nrcs.ini.example @@ -1,10 +1,10 @@ -[wxsite] +[nrcs] station_triplet = desired_data = -location_uuid = -csv_filename = -[ftp] +[infoex] host = uuid = api_key = +csv_filename = +location_uuid = diff --git a/infoex-autowx.py b/infoex-autowx.py index ea91bef..f703c42 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -77,18 +77,18 @@ wsdl = 'https://www.wcc.nrcs.usda.gov/awdbWebService/services?WSDL' try: infoex = { - 'host': config['ftp']['host'], - 'uuid': config['ftp']['uuid'], - 'api_key': config['ftp']['api_key'], - 'location_uuid': config['wxsite']['location_uuid'], + 'host': config['infoex']['host'], + 'uuid': config['infoex']['uuid'], + 'api_key': config['infoex']['api_key'], + 'location_uuid': config['infoex']['location_uuid'], 'wx_data': {}, # placeholder key, values to come later - 'csv_filename': config['wxsite']['csv_filename'] + 'csv_filename': config['infoex']['csv_filename'] } - station_triplet = config['wxsite']['station_triplet'] + station_triplet = config['nrcs']['station_triplet'] try: - desired_data = config['wxsite']['desired_data'].split(',') + desired_data = config['nrcs']['desired_data'].split(',') except: # desired_data malformed or missing, setting default desired_data = [