From 5c625fb41f4cbbec25b2fa5c851de75235f21af2 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 4 Nov 2018 19:08:28 -0500 Subject: Widget now uses the API key provided in the todoist_API.txt file --- inbox_for_todoist.widget/todoist.cache | Bin 6 -> 25656 bytes inbox_for_todoist.widget/todoistinbox.py | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'inbox_for_todoist.widget') diff --git a/inbox_for_todoist.widget/todoist.cache b/inbox_for_todoist.widget/todoist.cache index 482c0e3..1342982 100644 Binary files a/inbox_for_todoist.widget/todoist.cache and b/inbox_for_todoist.widget/todoist.cache differ diff --git a/inbox_for_todoist.widget/todoistinbox.py b/inbox_for_todoist.widget/todoistinbox.py index 52443bc..6207da4 100644 --- a/inbox_for_todoist.widget/todoistinbox.py +++ b/inbox_for_todoist.widget/todoistinbox.py @@ -3,7 +3,10 @@ import online import pickle import os -def main(token='___YOUR TODOIST TOKEN HERE:___'): # FIXME: Remove personal token when comitting +def main(): + with open('todoist_API.txt') as f: # Opens the API key file + token = f.readline() # Sets the first line of the txt file as your API Key + if online.main() == False: with open("todoist.cache", "rb") as myFile: loaded_cache = pickle.load(myFile) -- cgit v1.2.3 From e2cdd12a227a8fad949d4b3c4b9f98d7ff67d6d6 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Sun, 4 Nov 2018 19:10:46 -0500 Subject: Widget now uses the API key provided in the todoist_API.txt file --- inbox_for_todoist.widget/todoist.cache | Bin 25656 -> 25656 bytes inbox_for_todoist.widget/todoistinbox.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'inbox_for_todoist.widget') diff --git a/inbox_for_todoist.widget/todoist.cache b/inbox_for_todoist.widget/todoist.cache index 1342982..5fe4d71 100644 Binary files a/inbox_for_todoist.widget/todoist.cache and b/inbox_for_todoist.widget/todoist.cache differ diff --git a/inbox_for_todoist.widget/todoistinbox.py b/inbox_for_todoist.widget/todoistinbox.py index 6207da4..c49d3f5 100644 --- a/inbox_for_todoist.widget/todoistinbox.py +++ b/inbox_for_todoist.widget/todoistinbox.py @@ -5,7 +5,7 @@ import os def main(): with open('todoist_API.txt') as f: # Opens the API key file - token = f.readline() # Sets the first line of the txt file as your API Key + token = f.readline() # Sets the first line of the txt file as your API Key if online.main() == False: with open("todoist.cache", "rb") as myFile: @@ -21,7 +21,7 @@ def main(): elif i['priority'] == 3: pri = "

" elif i['priority'] == 4: - pri = "

" # FIXME: Color coding not working... + pri = "

" rank += 1 print(pri, "", rank, '- ', i['content'], "

") # print name and id -- cgit v1.2.3 From bc935b67ed0c97aa6a39a0c441579f8f820f81d0 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse <19275615+ChausseBenjamin@users.noreply.github.com> Date: Sun, 4 Nov 2018 19:15:31 -0500 Subject: Create todoist_API.txt --- inbox_for_todoist.widget/todoist_API.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 inbox_for_todoist.widget/todoist_API.txt (limited to 'inbox_for_todoist.widget') diff --git a/inbox_for_todoist.widget/todoist_API.txt b/inbox_for_todoist.widget/todoist_API.txt new file mode 100644 index 0000000..85e72fa --- /dev/null +++ b/inbox_for_todoist.widget/todoist_API.txt @@ -0,0 +1 @@ +___YOUR TODOIST TOKEN HERE:___ -- cgit v1.2.3