From 8916fac827112ff42142be717a0a92003a8a2bc6 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Wed, 3 Oct 2018 00:17:38 -0400 Subject: Updated to match Ubersicht Requirements --- .DS_Store | Bin 0 -> 6148 bytes Screenshot.jpg | Bin 402988 -> 0 bytes inbox_for_todoist.widget.zip | Bin 0 -> 2307 bytes inbox_for_todoist.widget/index.coffee | 45 +++++++++++++++++++++++++++++++ inbox_for_todoist.widget/run.sh | 2 ++ inbox_for_todoist.widget/todoistinbox.py | 13 +++++++++ index.coffee | 45 ------------------------------- run.sh | 2 -- screenshot.png | Bin 0 -> 402988 bytes todoistinbox.py | 13 --------- widget.json | 6 +++++ 11 files changed, 66 insertions(+), 60 deletions(-) create mode 100644 .DS_Store delete mode 100644 Screenshot.jpg create mode 100644 inbox_for_todoist.widget.zip create mode 100755 inbox_for_todoist.widget/index.coffee create mode 100644 inbox_for_todoist.widget/run.sh create mode 100644 inbox_for_todoist.widget/todoistinbox.py delete mode 100755 index.coffee delete mode 100644 run.sh create mode 100644 screenshot.png delete mode 100644 todoistinbox.py create mode 100644 widget.json diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..8e8068c Binary files /dev/null and b/.DS_Store differ diff --git a/Screenshot.jpg b/Screenshot.jpg deleted file mode 100644 index 65a0eaa..0000000 Binary files a/Screenshot.jpg and /dev/null differ diff --git a/inbox_for_todoist.widget.zip b/inbox_for_todoist.widget.zip new file mode 100644 index 0000000..8824dd0 Binary files /dev/null and b/inbox_for_todoist.widget.zip differ diff --git a/inbox_for_todoist.widget/index.coffee b/inbox_for_todoist.widget/index.coffee new file mode 100755 index 0000000..b571976 --- /dev/null +++ b/inbox_for_todoist.widget/index.coffee @@ -0,0 +1,45 @@ +# -*-coding:utf-8 -* + +command: ". todoist/run.sh" + +refreshFrequency: 1000#*60#*5#*2#*2#*3#*12 + +style: """ + top: 245px + right: 0px + width: 240px + height: 600px + margin-left: -(@width / 2) + overflow: hidden + .content + color: #F2F2F2 + margin-left: 7px + font-size: 16px + font-family: Avenir-Light + text-align: left + .title + color: #F2F2F2 + font-size: 24px + font-family: Avenir-Book + text-align: center + bg-blur = 10px + .bg-slice + position: absolute + top: -(bg-blur) + left: -(bg-blur) + width: 100% + 2*bg-blur + height: 100% + 2*bg-blur + -webkit-filter: blur(bg-blur) + .mini + font-size: 2px + line-height: 0%; +""" + +render: (output) -> """ + +
Todoist Inbox
+
#{output}
+""" + +afterRender: (domEl) -> + uebersicht.makeBgSlice(el) for el in $(domEl).find '.bg-slice' diff --git a/inbox_for_todoist.widget/run.sh b/inbox_for_todoist.widget/run.sh new file mode 100644 index 0000000..16cb830 --- /dev/null +++ b/inbox_for_todoist.widget/run.sh @@ -0,0 +1,2 @@ +export LANG=en_CA.UTF-8; +python3 todoist/todoistinbox.py diff --git a/inbox_for_todoist.widget/todoistinbox.py b/inbox_for_todoist.widget/todoistinbox.py new file mode 100644 index 0000000..c350812 --- /dev/null +++ b/inbox_for_todoist.widget/todoistinbox.py @@ -0,0 +1,13 @@ +# -*-coding:utf-8 -* +def main(token='___YOUR TODOIST TOKEN HERE:___'): + from todoist.api import TodoistAPI + api = TodoistAPI(token) + api.sync() # initial sync + rank = 0 + for i in api.state['items']: #going through all the items in todoist + if i['project_id'] == 170911352: # if an item is in the inbox + if i['checked'] == 0: # if the item is incomplete + rank += 1 + print("", rank, '- ', i['content'], "

") # print name and id +if __name__ == '__main__': + main() diff --git a/index.coffee b/index.coffee deleted file mode 100755 index b571976..0000000 --- a/index.coffee +++ /dev/null @@ -1,45 +0,0 @@ -# -*-coding:utf-8 -* - -command: ". todoist/run.sh" - -refreshFrequency: 1000#*60#*5#*2#*2#*3#*12 - -style: """ - top: 245px - right: 0px - width: 240px - height: 600px - margin-left: -(@width / 2) - overflow: hidden - .content - color: #F2F2F2 - margin-left: 7px - font-size: 16px - font-family: Avenir-Light - text-align: left - .title - color: #F2F2F2 - font-size: 24px - font-family: Avenir-Book - text-align: center - bg-blur = 10px - .bg-slice - position: absolute - top: -(bg-blur) - left: -(bg-blur) - width: 100% + 2*bg-blur - height: 100% + 2*bg-blur - -webkit-filter: blur(bg-blur) - .mini - font-size: 2px - line-height: 0%; -""" - -render: (output) -> """ - -
Todoist Inbox
-
#{output}
-""" - -afterRender: (domEl) -> - uebersicht.makeBgSlice(el) for el in $(domEl).find '.bg-slice' diff --git a/run.sh b/run.sh deleted file mode 100644 index 16cb830..0000000 --- a/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -export LANG=en_CA.UTF-8; -python3 todoist/todoistinbox.py diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..65a0eaa Binary files /dev/null and b/screenshot.png differ diff --git a/todoistinbox.py b/todoistinbox.py deleted file mode 100644 index c350812..0000000 --- a/todoistinbox.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*-coding:utf-8 -* -def main(token='___YOUR TODOIST TOKEN HERE:___'): - from todoist.api import TodoistAPI - api = TodoistAPI(token) - api.sync() # initial sync - rank = 0 - for i in api.state['items']: #going through all the items in todoist - if i['project_id'] == 170911352: # if an item is in the inbox - if i['checked'] == 0: # if the item is incomplete - rank += 1 - print("", rank, '- ', i['content'], "

") # print name and id -if __name__ == '__main__': - main() diff --git a/widget.json b/widget.json new file mode 100644 index 0000000..d60e86b --- /dev/null +++ b/widget.json @@ -0,0 +1,6 @@ +{ + "name": "Inbox for Todoist", + "description": "An Übersicht widget for your Todoist Inbox", + "author": "Benjamin Chausse", + "email": "benjaminchausse@gmail.com" +} -- cgit v1.2.3