aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/todoist
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/todoist')
-rw-r--r--recipes/todoist/LICENSE21
-rw-r--r--recipes/todoist/README.md5
-rw-r--r--recipes/todoist/icon.pngbin0 -> 37561 bytes
-rw-r--r--recipes/todoist/icon.svg28
-rw-r--r--recipes/todoist/index.js3
-rw-r--r--recipes/todoist/package.json14
-rw-r--r--recipes/todoist/webview.js22
7 files changed, 93 insertions, 0 deletions
diff --git a/recipes/todoist/LICENSE b/recipes/todoist/LICENSE
new file mode 100644
index 0000000..f0472f5
--- /dev/null
+++ b/recipes/todoist/LICENSE
@@ -0,0 +1,21 @@
1MIT License
2
3Copyright (c) 2017 Mike Burke
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21SOFTWARE.
diff --git a/recipes/todoist/README.md b/recipes/todoist/README.md
new file mode 100644
index 0000000..e94ee80
--- /dev/null
+++ b/recipes/todoist/README.md
@@ -0,0 +1,5 @@
1# recipe-todoist
2Recipe for Todoist integration with Franz 5
3
4### How to create your own Franz recipes:
5* [Read the documentation](https://github.com/meetfranz/plugins)
diff --git a/recipes/todoist/icon.png b/recipes/todoist/icon.png
new file mode 100644
index 0000000..24a83b4
--- /dev/null
+++ b/recipes/todoist/icon.png
Binary files differ
diff --git a/recipes/todoist/icon.svg b/recipes/todoist/icon.svg
new file mode 100644
index 0000000..d349c06
--- /dev/null
+++ b/recipes/todoist/icon.svg
@@ -0,0 +1,28 @@
1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5 width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 511.000000"
6 preserveAspectRatio="xMidYMid meet">
7<metadata>
8Created by potrace 1.13, written by Peter Selinger 2001-2015
9</metadata>
10<g transform="translate(0.000000,511.000000) scale(0.100000,-0.100000)"
11fill="#db4c3f" stroke="none">
12<path d="M515 5085 c-233 -50 -436 -253 -484 -483 -7 -35 -11 -210 -11 -505
13l1 -452 380 -220 c578 -334 523 -306 599 -302 l65 3 895 514 c1048 602 935
14556 1105 457 122 -70 149 -98 141 -141 -4 -17 -12 -36 -19 -43 -13 -14 -1959
15-1133 -2077 -1196 -69 -36 -80 -39 -133 -34 -60 5 -95 24 -767 414 l-195 114
16-3 -208 c-1 -113 1 -210 5 -214 5 -4 208 -124 453 -266 l445 -258 75 0 75 0
17870 499 c479 275 890 508 914 519 29 13 55 17 78 14 37 -6 226 -107 258 -138
1825 -25 25 -83 0 -108 -23 -21 -2069 -1195 -2120 -1217 -47 -19 -112 -17 -160
195 -32 15 -419 236 -820 469 l-70 41 -3 -206 c-2 -158 1 -210 10 -218 7 -7 211
20-126 453 -266 l440 -254 75 0 75 0 870 499 c479 275 890 508 914 519 28 12 56
2117 77 14 42 -7 252 -124 264 -148 16 -29 12 -84 -7 -101 -25 -21 -2074 -1195
22-2117 -1213 -55 -23 -119 -19 -179 11 -50 25 -807 461 -855 492 l-23 15 3
23-484 c4 -434 6 -490 22 -539 43 -130 115 -239 213 -321 63 -53 191 -114 273
24-131 53 -10 446 -13 2055 -13 l1990 0 80 23 c227 66 397 242 450 467 13 51 15
25365 15 2056 0 1954 0 1997 -20 2073 -59 231 -247 414 -475 461 -99 21 -4006
2621 -4100 0z"/>
27</g>
28</svg>
diff --git a/recipes/todoist/index.js b/recipes/todoist/index.js
new file mode 100644
index 0000000..e8243fb
--- /dev/null
+++ b/recipes/todoist/index.js
@@ -0,0 +1,3 @@
1"use strict";
2
3module.exports = Franz => Franz; \ No newline at end of file
diff --git a/recipes/todoist/package.json b/recipes/todoist/package.json
new file mode 100644
index 0000000..4cf557a
--- /dev/null
+++ b/recipes/todoist/package.json
@@ -0,0 +1,14 @@
1{
2 "id": "todoist",
3 "name": "Todoist",
4 "version": "1.1.0",
5 "description": "todoist plugin for Franz 5",
6 "main": "index.js",
7 "author": "Alex Ward <alex@alexward.me.uk>, Mike Burke <mburke@dmwtechnology.com>",
8 "license": "MIT",
9 "repository": "https://github.com/meetfranz/recipe-todoist",
10 "config": {
11 "serviceURL": "https://todoist.com/app",
12 "hasIndirectMessages": true
13 }
14}
diff --git a/recipes/todoist/webview.js b/recipes/todoist/webview.js
new file mode 100644
index 0000000..3263348
--- /dev/null
+++ b/recipes/todoist/webview.js
@@ -0,0 +1,22 @@
1"use strict";
2
3module.exports = (Franz, options) => {
4 function getTasks() {
5 let todayCount = 0;
6 let inboxCount = 0;
7 const todayElement = document.querySelector("#top_filters .counter.overdue_color");
8 const inboxElement = document.querySelector("#filter_inbox .counter");
9
10 if (todayElement) {
11 todayCount = parseInt(todayElement.innerHTML, 10);
12 }
13
14 if (inboxElement) {
15 inboxCount = parseInt(inboxElement.innerHTML, 10);
16 }
17
18 Franz.setBadge(inboxCount, todayCount);
19 }
20
21 Franz.loop(getTasks);
22}; \ No newline at end of file