Scriptable iOS Widget for Tasks Plugin

I’ve been trying to use Obsidian as a task manager with the tasks plugin for the past few weeks, but I really on having a widget for my tasks on the home screen. I used to use the iOS shortcuts app + Toolbox Pro for file access + a Pushcut widget, but it took took minutes to update the Widget and updates had to be manually triggered.
Now I finally managed to use my very basic JS skills get a Scriptable script working, which basically just searches all folders for md files, and scans them for a regular expression of a Tasks task to then display them on a widget. It works pretty well and updates in under 500ms. Anyone else got ideas for widgets?

This is really cool!

This kind of interaction—and quick task capture—are the only thing keeping some of my tasks in Things versus Obsidian. I like them in Obsidian because they’re contextual to where they came up. Things is quick to capture when I’m not in Obsidian.

Yeah, same for me actually, I also used things before, but having them in documents just adds a huge ammount of value to it, I even link affiliated PDFs sometimes.

Would you mind sharing your script? This looks promising.

Sure, I can share, but I had to retract some private stuff. Consider that I’m not good at programming at all though, this is made with very basic JS knowledge.

I attached the original script, but if you have more than 100 Notes, it will not work because of the memory limitations Apple puts on widgets. I fixed this by periodically running a whole script and writing the task list to a text file being read by the widget.

https://www.toptal.com/developers/hastebin/ekipirukuh.js

1 Like

Thanks.