Todoist inbox and due items count


#1

I wanted a way to display the number of items in my inbox and items due in the next 24 hours on my touchbar. And most importantly, I did not want Todoist to have to be running. This uses the Todoist Sync API to stay up to date

To use this, get your Todoist API Key from Settings -> Integrations and paste it into the two scripts.

You will also have to run pip install todoist-python since I am using the API.

Todoistv1.bttpreset (53.0 KB) (updated to use the share site)

Would love to know how I could set this once then use it in both scripts. Can I set a var somewhere?


#2

Nice! I like the look of that. I don't use Todoist, but I will use this as inspiration for other widgets.

You can set variables through BTT (since v2.530) with AppleScript (documentation). You could set the variable with a quick, ad-hoc script. Then each time the widgets run they would get the variable from BTT. I don't know how this affects speed, but I imagine it would be negligible. If you're running a shell script, I believe you can use osascript to run AppleScript and get the value returned. And maybe @Andreas_Hegenberg knows a more direct way to get those variables via shell (I don't know where they're being stored, but now I want to go explore; maybe they're in a plist somewhere?)

There's a built-in way to share presets here on the forum (I can't find it right now, for some reason). It allows readers to preview the preset without downloading and opening the file. If you find that, would you mind sharing it that way, as well, for quick preview?

If you have any questions on the variable scripting, let me know; I'd be happy to help you build that (though I am not an expert...yet).


#3

weird. I thought I did share it the way I was supposed to.

Ahhh, found it