Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page numbers of the highlights #46

Open
Georgeszs opened this issue Apr 21, 2022 · 5 comments
Open

Page numbers of the highlights #46

Georgeszs opened this issue Apr 21, 2022 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@Georgeszs
Copy link

Hello,

I dont know if it is possible, but i love to see some kind of option whereby the location of the highlight (page number) is exported into readwise. So all the highlight will be in the right order.

Kind regards

@marcus-crane marcus-crane added the enhancement New feature or request label Apr 21, 2022
@marcus-crane
Copy link
Owner

marcus-crane commented Apr 21, 2022

I had briefly looked at this but didn't see anything obvious but this might be possible upon closer inspection.

For context, here's an example of how a highlight looks in the Kobo database:

              BookmarkID = 0bc70014-4299-44ae-b128-cef3f364e821
                VolumeID = file:///mnt/onboard/Moore, Geoffrey A_/Crossing the Chasm, 3rd Edition_ Marketing and Selling DisruptiProducts to Mainstream Customers - Geoffrey A. Moore.kepub.epub
               ContentID = /mnt/onboard/Moore, Geoffrey A_/Crossing the Chasm, 3rd Edition_ Marketing and Selling DisruptiProducts to Mainstream Customers - Geoffrey A. Moore.kepub.epub!!OEBPS/text00007.html
      StartContainerPath = span#kobo\.57\.1
StartContainerChildIndex = -99
             StartOffset = 0
        EndContainerPath = span#kobo\.60\.1
  EndContainerChildIndex = -99
               EndOffset = 0
                    Text = To give a prosaic example, in In Search of Excellence
 Tom Peters and Robert Waterman tell the story of the fellow at 3M who invented Post-it notes. He just put them on the desk of secretaries, and some of those secretaries just tried them to see if or how they would work. Those secretaries became Post-it note enthusiasts and were an early key in the campaign to keep the product idea alive.

              Annotation =
     ExtraAnnotationData =
             DateCreated = 2021-05-31T10:51:14.435
         ChapterProgress = 0.217391304347826
                  Hidden = false
                 Version =
            DateModified = 2021-05-31T10:51:14Z
                 Creator =
                    UUID =
                  UserID = ca59cd27-e6dd-46be-b09c-02d6b75a0f5a
                SyncTime =
               Published = false
           ContextString =

While we think of a book as a single thing, they are often split by chapters as hinted at by the ContentID field:

ContentID = /mnt/onboard/Moore, Geoffrey A_/Crossing the Chasm, 3rd Edition_ Marketing and Selling DisruptiProducts to Mainstream Customers - Geoffrey A. Moore.kepub.epub!!OEBPS/text00007.html

text00007.html presumably being Chapter 7. We also have the chapter progress:

ChapterProgress = 0.217391304347826

Neither of these are the page count but we can sort of figure out how far through the book someone is with these two things.

It could be the case that the file for a given chapter might not be a number (eg; textabcde.html) or other weird cases like that. I'd have to see how epubs are commonly structured which is partly why I left it for later.

I did also consider ordering highlights by the time they were highlighted but that isn't really accurate since I might make a highlight on Page 50 then go back a few pages and highlight Page 47 so from a page perspective, the highlights would be backwards.

I'll see what I can come up with thought. It would be nice to have even if the Kobo itself doesn't have (at a database level) the book progress as far as I'm aware. Maybe I can figure it out by looking into some other parts of the database 🤷

@teamcoltra
Copy link

Can you access the Epub from October? If you can it would be trivial to access the opf file within the manifest. Theoretically, a manifest could still be listed out of order, but I think you should build for the 99.999% of books here.

@oleestar
Copy link

In my Kobo Forma settings, there is an option on the second page: "Show Adobe EPUB page numbers". Where that data comes from? Maybe that can be useful to add a page number info to the highlights.

Otherwise, I agree, the page numbers would be helpful to remember where the quote was in the book.

@marcus-crane
Copy link
Owner

I wrote a little bit more about the background in a request for this feature that came in: #70 (comment)

I think to truly solve this, it is going to have to require entering the business of inspecting the underlying epub files for their manifest files

As an upside though, while October is digging around in the epub, it should be able to fetch much nicer metadata as well as retrieving a full colour cover for upload without the existing Calibre workarounds.

I hadn't quite realised the extent of the issue, as far as highlights being in random order since I don't really consult my own highlights in the context that they appear in the source material but it is something that I hope to prioritise now

@marcus-crane
Copy link
Owner

Some relevant progress information here: #71 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants