Hacker News new | ask | show | jobs
by nozzlegear 165 days ago
I love Apple Notes, but I also love writing in vim; looks like I can finally reconcile those two things thanks to your project. Nice work!

> questions about the quirks

I've used a decent amount of AppleScript to automate things on my Mac, so I know it's a powerful tool but not easy to just jump into, even when you're already familiar with that bizarre syntax. What kinds of quirks did you run into?

1 comments

It's a mix of the lack of documentation for the response payloads and the integration with the shell commands. My tip would be to wrap everything in shell, handle errors on the AppleScript end, and keeping it incredibly simple.

For example, the errors raised from the AppleScript without printing the error inside a try-catch are incredibly dim. So instead I've opted to wrap them on the AppleScript level, print the error and return an empty string. Kinda reminded me of old-school shitty C code.