Change around and rename some config parameters
authorAlexander Vasarab <alexander@wylark.com>
Tue, 30 Jun 2020 18:03:08 +0000 (11:03 -0700)
committerAlexander Vasarab <alexander@wylark.com>
Tue, 30 Jun 2020 18:03:08 +0000 (11:03 -0700)
.gitignore
README.md
config-nrcs.ini.example
infoex-autowx.py

index 0a764a4de3a890dbe2a3336c648f7f6d1892c132..6c5d96fd7fc186f4fca5013ded41f30290da733e 100644 (file)
@@ -1 +1,2 @@
 env
+.CSV
index 44338289fb499617d129fcf968832b4f8e019a79..fc9d6aeda71a4bc1e8dc0e335d46805f1e6f0398 100644 (file)
--- 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
 --------------------------
index 018a6fca1de13435c03e1a7ca7cb72166f202096..449132ee43468138a589a73c00c8b78e43063597 100644 (file)
@@ -1,10 +1,10 @@
-[wxsite]
+[nrcs]
 station_triplet = <NRCS Station ID>
 desired_data = <Comma-separated list of NRCS elementCd values>
-location_uuid = <InfoEx-supplied Location UUID>
-csv_filename = <Name of file to upload to InfoEx FTP>
 
-[ftp]
+[infoex]
 host = <InfoEx FTP host address>
 uuid = <InfoEx-supplied UUID>
 api_key = <InfoEx-supplied API Key>
+csv_filename = <Name of file to upload to InfoEx FTP>
+location_uuid = <InfoEx-supplied Location UUID>
index ea91beff5dc256cfde9116457fc71be1fd49ebb4..f703c4298f3a63f0fe570f86959240d2a2d470c8 100755 (executable)
@@ -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 = [