This morning I pushed a pretty large update to the Readwise to DEVONthink script I published yesterday. It adds some important features, so if you’ve already downloaded the script, you might want to update.
The previous version worked fine, but there were a couple of things it needed to do better.
First, it was failing to find existing notes if the note title contained punctuation. This is fixed, so adding highlights and notes to existing documents won’t create duplicates. It’s still creating duplicate annotations and I haven’t figured out why yet, but that may be fixed in a future release.
Second, I didn’t like that it was highlighting entire paragraphs when the Readwise highlight was only a portion. I originally set it up that way because it was tricky to match the text when it contained Markdown markup like emphasis and links, as the Readwise highlight wouldn’t have that in it, so matching it was difficult and it ran the risk of overwriting or breaking existing syntax. I think I have this solved, and it should always be able to highlight specific text in a paragraph without breaking anything. (If you reset the date file and run the script again, it will update all of your highlights with the more specific versions automatically.)
Highlights are also now sorted by their position in the document when adding them to annotations. Previously it was sorted by date added, so the document order of highlights in the annotations was out of whack.
Lastly, I added some output options. You can use --quiet
to silence all output. You can also use --debug
or --verbose
to output a little more information about each bookmark saved. If you use --verbose
and an AppleScript command fails, it will actually show you the code it tried to run, which is tremendously helpful for debugging.
I think I’ve got it at a point where I can stop fiddling now. Check out the updated script and let me know if you have any issues.