From a01ff80775db0a358a6f118eec4a07aebd14d731 Mon Sep 17 00:00:00 2001 From: gjr80 Date: Tue, 6 Sep 2016 23:04:24 +1000 Subject: [PATCH 1/2] Fix conflicting --date argument format --- bin/wee_import | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/wee_import b/bin/wee_import index 729e3411..d19991d0 100644 --- a/bin/wee_import +++ b/bin/wee_import @@ -481,21 +481,21 @@ usage = """wee_import --help [--config=CONFIG_FILE] [--import-config=IMPORT_CONFIG_FILE] --source=CSV_SOURCE_FILE - [--date YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm] + [--date "YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm"] [--calc-missing] [--dry-run] [--log=None|LOG_FACILITY] [--verbose] wee_import --wunder [--config=CONFIG_FILE] [--import-config=IMPORT_CONFIG_FILE] --station=PWS_NAME - [--date YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm] + [--date "YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm"] [--calc-missing] [--dry-run] [--log=None|LOG_FACILITY] [--verbose] wee_import --cumulus [--config=CONFIG_FILE] [--import-config=IMPORT_CONFIG_FILE] --source=MONTHLY_LOGS_FOLDER - [--date YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm] + [--date "YYYY/MM/DD|YYYY/MM/DD hh:mm-YYYY/MM/DD hh:mm"] [--calc-missing] [--dry-run] [--log=None|LOG_FACILITY] [--verbose] wee_import --version @@ -545,10 +545,10 @@ def main(): parser.add_option('--station', dest='station', type=str, metavar="PWS_NAME", help="Station name to be used (eg, \"KORHOODR3\").") - parser.add_option("--date", dest="date", type=str, metavar="YYYY-MM-DD", - help="Date to import as a string of form \"YYYY-MM-DD\" " - "or a date range of form \"YYYY-MM-DD hh:mm-" - "YYYY-MM-DD hh:mm\"") + parser.add_option("--date", dest="date", type=str, metavar="YYYY/MM/DD", + help="Date to import as a string of form \"YYYY/MM/DD\" " + "or a date range of form \"YYYY/MM/DD hh:mm-" + "YYYY/MM/DD hh:mm\"") parser.add_option('--log', dest='logging', type=str, metavar="LOG_FACILITY", default='weewx', help="Control logging of most output. If omitted or " From 57f62fbd858d2924c98b50f2a85b6503ab6f986b Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Tue, 6 Sep 2016 08:48:23 -0700 Subject: [PATCH 2/2] Clarified that weewx supports FTPS, not SFTP. --- README.md | 2 +- bin/weecfg/test/expected/weewx32_expected.conf | 2 +- bin/weecfg/test/expected/weewx_user_expected.conf | 2 +- bin/weeutil/ftpupload.py | 4 ++-- docs/changes.txt | 2 +- docs/usersguide.htm | 4 +++- weewx.conf | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aedb81c4..90031e9e 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@
  • Support for multiple skins
  • Support sqlite and MySQL
  • Optional uploads to Weather Underground, CWOP, AWEKAS, WOW, and others
  • -
  • Uploads to your website via FTP, SFTP, or rsync
  • +
  • Uploads to your website via FTP, FTPS, or rsync
  • Extensive almanac information
  • diff --git a/bin/weecfg/test/expected/weewx32_expected.conf b/bin/weecfg/test/expected/weewx32_expected.conf index 461db156..22dc2209 100644 --- a/bin/weecfg/test/expected/weewx32_expected.conf +++ b/bin/weecfg/test/expected/weewx32_expected.conf @@ -142,7 +142,7 @@ version = 3.2.0 #server = replace with your server name, e.g, www.threefools.org #path = replace with the destination directory (e.g., /weather) - # Set to True for a secure FTP (SFTP) connection. Not all servers + # Set to True for an FTP over TLS (FTPS) connection. Not all servers # support this: secure_ftp = False diff --git a/bin/weecfg/test/expected/weewx_user_expected.conf b/bin/weecfg/test/expected/weewx_user_expected.conf index 12c1ff4b..944a3b83 100644 --- a/bin/weecfg/test/expected/weewx_user_expected.conf +++ b/bin/weecfg/test/expected/weewx_user_expected.conf @@ -202,7 +202,7 @@ version = 3.2.0a2 #server = replace with the ftp server name, e.g, www.threefools.org #path = replace with the ftp destination directory (e.g., /weather) - # Set to True for a secure FTP (SFTP) connection. Not all servers + # Set to True for an FTP over TLS (FTPS) connection. Not all servers # support this. secure_ftp = False diff --git a/bin/weeutil/ftpupload.py b/bin/weeutil/ftpupload.py index 1b013e3c..99634a97 100644 --- a/bin/weeutil/ftpupload.py +++ b/bin/weeutil/ftpupload.py @@ -47,7 +47,7 @@ class FtpUpload(object): max_tries: How many times to try creating a directory or uploading a file before giving up [Optional. Default is 3] - secure: Set to True to attempt a secure FTP (SFTP) session. + secure: Set to True to attempt an FTP over TLS (FTPS) session. debug: Set to 1 for extra debug information, 0 otherwise. """ @@ -73,7 +73,7 @@ class FtpUpload(object): FTPClass = ftplib.FTP_TLS except AttributeError: FTPClass = ftplib.FTP - syslog.syslog(syslog.LOG_DEBUG, "ftpupload: Your version of Python does not support SFTP. Using unsecure connection.") + syslog.syslog(syslog.LOG_DEBUG, "ftpupload: Your version of Python does not support FTPS. Using insecure connection.") self.secure = False else: FTPClass = ftplib.FTP diff --git a/docs/changes.txt b/docs/changes.txt index 71fcbe19..bce98cd5 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -408,7 +408,7 @@ Fixes ticket #40. Fixed problem where dumping to database could cause stats to get added to the daily summaries twice. -Secure FTP (SFTP) sessions are now possible, but don't work very well with +FTP over TLS (FTPS) sessions are now possible, but don't work very well with Microsoft FTP servers. Requires Python v2.7. Will not work with older versions of Python. Fixes ticket #37. diff --git a/docs/usersguide.htm b/docs/usersguide.htm index 0ec78702..7a8c777a 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -2452,7 +2452,9 @@ longitude = -77.0366

    secure_ftp

    -

    Set to True to use a secure FTP (SFTP) connection. Not +

    Set to True to use FTP (FTPS) over TLS. This is an extension to the FTP + protocol that uses a Secure Socket Layer (SSL) protocol, not to be confused with + SFTP, which uses a Secure Socket Shell protocol. Not all FTP servers support this. In particular, the Microsoft FTP server seems to do a poor job of it. Requires Python V2.7. Will not work with older versions of Python. Optional. Default is False

    diff --git a/weewx.conf b/weewx.conf index 2f9c5994..a99a19e5 100644 --- a/weewx.conf +++ b/weewx.conf @@ -150,7 +150,7 @@ version = 3.5.0 #server = replace with the ftp server name, e.g, www.threefools.org #path = replace with the ftp destination directory (e.g., /weather) - # Set to True for a secure FTP (SFTP) connection. Not all servers + # Set to True for an FTP over TLS (FTPS) connection. Not all servers # support this. secure_ftp = False