I love Bear's Markdown-ish text editing and tagging, and it's my favourite notes app by far. Bear notes can include Tasks, which are internally stored using the Takspaper syntax -
on a line for a task, +
for a completed task. I wanted to write up my daily planning including tasks in Bear, but I use Things 3 as my task manager. So I wanted an easy way of extracting those notes and adding them to Things 3 so I could prioritise/follow up on them.
Unfortunately, Applescript dictionaries have fallen out of favour in modern (i.e. Post-iOS) Mac apps, so the process of getting the data out of Bear via automation wasn't immediately obvious. Fortunately, Bear stores your notes in an un-encrypted SQLite database (the default for Core Data), so we can solve this with programming :)
Using Shaune Kane's Bear backup gist as inspiration: https://gist.github.com/shaunkane/6b21e48e5bbd54f76806f0a13f19e79a, this gist is a script that queries the Bear SQLite data store, gra