diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2021-11-09 16:35:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 16:35:09 +0000 |
commit | 51e0175a57f18f196ee6e1b5e82f19bac254748c (patch) | |
tree | c6e21191f2a54fc21eeebeeb46f751248eeec45a | |
parent | 7c3b20db5754f30405db06d929dd0e3009096995 (diff) | |
parent | d3b199be6dfd6b0083050478c3879363a567eea9 (diff) | |
download | calendar-cli-51e0175a57f18f196ee6e1b5e82f19bac254748c.zip |
Merge pull request #86 from bug/master
Get password from a file
-rwxr-xr-x | calendar-cli.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index 3d1ca2e..198bb83 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -835,6 +835,7 @@ def main(): parser.add_argument("--caldav-user", help="username to log into the caldav server", metavar="USER") parser.add_argument("--caldav-pass", help="password to log into the caldav server", metavar="PASS") parser.add_argument("--caldav-proxy", help="HTTP proxy server to use (if any)") + parser.add_argument("--file-pass", help="Absolute path to file containing the password") parser.add_argument("--ssl-verify-cert", help="verification of the SSL cert - 'yes' to use the OS-provided CA-bundle, 'no' to trust any cert and the path to a CA-bundle") parser.add_argument("--debug-logging", help="turn on debug logging", action="store_true") parser.add_argument("--calendar-url", help="URL for calendar to be used (may be absolute or relative to caldav URL, or just the name of the calendar)") @@ -964,6 +965,10 @@ def main(): caldav.log.setLevel(logging.DEBUG) caldav.log.addHandler(logging.StreamHandler()) + if args.file_pass: + with open(args.file_pass, 'r') as f: + args.caldav_pass = f.read().strip() + if not args.nocaldav: if not args.calendar_url and not args.caldav_url: sys.stderr.write(""" |