mirror of https://github.com/Hoffelhas/autodoist
Allow api key to be set from environment variable
In dockerised environments, secrets are usually set from environment variables to allow them to be overlayed securely in cases where configuration is given by docker-compose. Signed-off-by: Christopher Obbard <chris@64studio.com>pull/17/head
parent
7aa35fb65b
commit
db76979dac
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
from todoist.api import TodoistAPI
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import requests
|
||||
|
@ -902,7 +903,7 @@ def main():
|
|||
parser = argparse.ArgumentParser(
|
||||
formatter_class=make_wide(argparse.HelpFormatter, w=120, h=60))
|
||||
parser.add_argument('-a', '--api_key',
|
||||
help='takes your Todoist API Key.', type=str)
|
||||
help='takes your Todoist API Key.', default=os.environ.get('TODOIST_API_KEY') type=str)
|
||||
parser.add_argument(
|
||||
'-l', '--label', help='enable next action labelling. Define which label to use.', type=str)
|
||||
parser.add_argument(
|
||||
|
|
Loading…
Reference in New Issue