Get todo's / custom text from Obsidian API

Hey All!

For a plugin I’m building I’m trying to search Obsidian for text (In this case todo’s in the form of - [ ] Todo and - [x] Done Todo). The plan is to sync it up to my ToDo app (Things3 in this case).

I work a lot with Restfull API’s but I can’t yet make heads or tail of the Obsidian API. Can someone point me in the right direction? I could easily do this with a grep + regex but I want to bundle it in to a plugin because I see a lot of people asking for this functionality.

If I remember correctly @liam has been working on something similar.

I created the Things Logbook plugin (GitHub - liamcain/obsidian-things-logbook: Sync your Things 3 Logbook with Obsidian) that does a one-way sync–so you always create tasks in Things and the tasks get moved into Obsidian when you mark them complete. That’s probably not what you’re after though.

For finding tasks in Obsidian you’ll want to parse the files manually. There are a bunch of existing plugins that are currently creating a task cache: slated, dataview, Checklist. You can take a look at their code to see how they’re accomplishing it.

1 Like

These pointers are exactly what I was looking for! Thank you so much :slight_smile:

You might want to have a look at how it was done here: GitHub - delashum/obsidian-checklist-plugin

2 Likes