From 459addddd97bac787179e7b3fca04a0754a4316f Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Mon, 26 Nov 2018 13:56:13 -0500 Subject: - Updated .sh command for broader compatibility - Updated README to provide a more complete installation process Changes to be committed: modified: README.md modified: inbox_for_todoist.widget/run.sh modified: inbox_for_todoist.widget/todoistinbox.py --- README.md | 35 ++++++++++++++++++++++++++++++++ inbox_for_todoist.widget/run.sh | 2 +- inbox_for_todoist.widget/todoistinbox.py | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 97bdfc5..e482cee 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,41 @@ Below is a preview of what Inbox for Todoist can look like: In some context with other widgets, your interface could look like this: ![Screenshot 2](screenshot2.png) + +## Requirements ## + +- Python 3 +- Todoist's Python Package + +### Installing Python 3 ### +#### From python's web site #### +Download and install the latest version of python 3 from [this website][687c9c62]: + +[https://www.python.org/downloads/mac-osx/][a832e4a1] + + [687c9c62]: https://www.python.org/downloads/mac-osx/ "Python 3 mac downloads" + + [a832e4a1]: https://www.python.org/downloads/mac-osx/ "Python 3 mac downloads" + +#### Using homebrew (Recommended)#### + +- First install homebrew (if not already installed). + - Do this by running the following command in a terminal window + + + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + +- Run the following command in a terminal window: + + + brew install python + +### Installing Todoist's Python Package ### +Open a terminal window and type: + + pip3 install todoist-python + + ## Installation ## Clone this repository to your Übersicht folder: `~/Library/Application Support/Übersicht/widgets/` diff --git a/inbox_for_todoist.widget/run.sh b/inbox_for_todoist.widget/run.sh index fc7a84b..368b182 100644 --- a/inbox_for_todoist.widget/run.sh +++ b/inbox_for_todoist.widget/run.sh @@ -1,2 +1,2 @@ export LANG=en_CA.UTF-8; -python3 todoistinbox.py +/usr/local/bin/python3 todoistinbox.py diff --git a/inbox_for_todoist.widget/todoistinbox.py b/inbox_for_todoist.widget/todoistinbox.py index 86121fb..45a6f4e 100644 --- a/inbox_for_todoist.widget/todoistinbox.py +++ b/inbox_for_todoist.widget/todoistinbox.py @@ -2,6 +2,7 @@ import online import pickle import os +from todoist.api import TodoistAPI def main(): with open('todoist_API.txt') as f: # Opens the API key file @@ -27,7 +28,6 @@ def main(): elif online.main() == True: - from todoist.api import TodoistAPI api = TodoistAPI(token) api.sync() # initial sync -- cgit v1.2.3