Hacker News new | ask | show | jobs
by jasode 4271 days ago
What do those stored annotations point to if members are providing the books?

This isn't RapGenius where all of the lyrics and annotations are shown on the same screen.

If the data structure of the stored annotations includes "pointers" to a specific book, what does it "point" to? A page number? Many epub/mobi books don't have absolute page numbers. For dead tree books, even the page numbers can change between the printing of the 1st hardback cover to the 2nd paperback edition.

When I think of "shared annotations", I'm thinking of virtual comments written in the margins of a book that anyone else can see. How would members "provide" books for that scenario? Upload epub & mobi files?

I guess it would be easier to quote (copy&paste) a particular passage a book and then follow up with some commentary but that type of thing can already be done today in any book discussion forum. To me, that's just quoting/citing and not annotating.

2 comments

For epubs from the same source, epubcfi[1] can be used to point to a passage. It is somewhat resilient to editing, as long as the gross structure of the document remains the same. (Parent tags, file name, ids.) iBooks uses this standard for annotations, but doesn't expose it anywhere.[2] I don't know if any other book readers use epubcfi for annotations.

I think mobi files loose enough structure in translation that it wouldn't be possible to locate an epubcfi pointer within them. However, it might work with the newer "format 8" files, if they are converted from an epub. (I haven't investigated how much structure is lost.)

[1]: http://www.idpf.org/epub/linking/cfi/epub-cfi.html

[2]: some records in my database don't have an epubcfi, but I haven't investigated whether they're user-created annotations or internal ones. (e.g. current location)

This could presumably be handled similar to how patch does it. When you make an annotation, you store an approximate location and say a hundred words of context. When someone loads your annotation, even if they have a slightly different edition, you can look for almost-the-same text, searching outwards from an appropriate point.