I am using a reMarkable Tablet which added support for highlights that are aligned with the text. The tablet specific details aren't really relevant for my question though, the abstract situation is:
- I have some datafiles that contain the information about what I highlighted in an epub on my device
- I would like to import these highlights into Calibre, so they show up like any other highlight added via the epub viewer
- in the future I would maybe integrate further external dependencies to automatically retrieve the highlight data from the Cloud API of the tablet, but for now I just have some local JSON files I need to work with.
My core question is: What are the appropriate APIs to add an highlights/annotations to an existing book? Are there existing examples for this API, ideally as a headless script that doesn't require adding GUI actions?
In case there are any existing plugins/tools/ideas for something like this, or completely different ways to approach this I am also curious to hear about them.