A New App

I spend a lot of my free time reading. While I do almost always prefer reading a physical book, the one thing that keeps me coming back to digital is the ease of creating highlights. I’m not someone who enjoys highlighting in a physical book, but I’ll highlight a ton on my Kindle or iPad when reading. The only issue is after I’m done reading a book, I tend to forget about those highlights until some random day when I’m trying to remember something I read in a book months past.

Kindle, of course, supports exporting all of your annotations, within reason due to DRM, to an HTML document for archiving purposes. Apple, on the other hand, has limited ability to export your highlights made in the Books app. There is a very handy command-line tool that lets you export your annotations by reading the SQLite database used by the Books app on macOS. This is a great tool, but I was finding it always slightly annoying to have to drop down to the command line every time I wanted to collect my notes. Plus, the command-line tool couldn’t interact with the Kindle exported HTML documents, which meant I never could have a single app for both Apple Books and Kindle.

A few months later, and I’ve built a new app! After digging around in the SQLite database, I was able to find all the relevant fields, databases (yes, there are actually two databases that the Books app uses), and tables that I needed to build my app. Like many of the personal apps I build for myself, though, I cared less about the UI and spent more time building out features. This led the app to look like this:

It was bare bones and all built in App Kit, but it worked great! And I was able to easily add an HTML parser so I could convert my Kindle notes as well. All in a single app with only a few clicks.

A few weeks ago though, I sat down to use it and felt with a bit of work, mainly a full rewrite to SwiftUI, I could have a proper-looking Mac app. So I sat down and got to work. I replaced the entire UI layer of App Kit and Xibs with a more modern SwiftUI interface. Which did make some things, like custom table views, much easier to build and implement. And thankfully, since my data layer was abstracted already, I could easily slot it into the new SwiftUI app without many problems. After about a week, I had a whole new UI that I felt looked much more like a real Mac app!

Now I’m happy to announce that I’ve released the app for free on my website! It works great, and I do have some small improvements to make, but hopefully, a few other people will find it helpful. I am debating if I should submit it to the Mac App Store, but I’m not sure how Apple will feel about me accessing the Books app’s SQLite databases, even though my app just makes a copy of the databases before interacting with it.

Brief side note…I really dislike the fact that Apple renamed iBooks to Books. I know why they did it, but it just makes the whole app and reading on the iPad feel so generic when it shouldn’t. And it also makes it harder to really talk about the app since calling it “Books” doesn’t do a good job of explaining what it is.