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

Incorrect order of extracted highlights #8601

Closed
ichnilatis-gr opened this issue Dec 29, 2021 · 13 comments
Closed

Incorrect order of extracted highlights #8601

ichnilatis-gr opened this issue Dec 29, 2021 · 13 comments
Milestone

Comments

@ichnilatis-gr
Copy link
Contributor

  • KOReader version: v2021.12.1
  • Device: PB 628

Issue

Some times the extracted highlights don't follow the order of the highlights in the book. You can see this in the following screenshots. (Sorry that they are from a Greek book).

Reader_2021-12-29_100018

Reader_2021-12-29_095839

@hius07
Copy link
Member

hius07 commented Dec 29, 2021

I guess the bookmark No 2 was added first on this page? (Check time)
Within one page bookmarks are sorted in order of adding them.
I agree that this should be fixed.

@ichnilatis-gr
Copy link
Contributor Author

The highlights were made in the order they appear on the page (as they are numbered in the first screenshot).

@hius07
Copy link
Member

hius07 commented Dec 30, 2021

Can you share a metadata.*.lua file of this book (it is in the .sdr folder that is near the book).

@ichnilatis-gr
Copy link
Contributor Author

It's 1.26 MB and it seems difficult to be uploaded... :-)

@Frenzie
Copy link
Member

Frenzie commented Dec 31, 2021

The limit should be something like 10 MB. Maybe if you zip it?

@hius07
Copy link
Member

hius07 commented Jan 3, 2022

There are no bookmarks in that file.

@ichnilatis-gr
Copy link
Contributor Author

ichnilatis-gr commented Jan 3, 2022

Excuse me, my false. Wrong file.

By the way, have a blessed year with good health!

@hius07
Copy link
Member

hius07 commented Jan 3, 2022

Thank you for the file. I see that the bookmarks of page 261 are in good order.
I guess they are displayed in the Bookmark list in good order too.

It seems that the issue occurs in the Exporter plugin that tries to finally sort the list to be exported

table.sort(book, function(v1, v2) return v1[1].page < v2[1].page end)

taking into account page numbers only.
When page numbers of several elements are the same, we cannot get the correct order of the bookmarks of this page.

I'm now working on fixing the bookmark module to get bookmarks of one page correctly sorted depending on their position in the text (now they are sorted in order of adding).
If I succeed (hope so) I'll try to look into the plugin more closely, it would be easier to fix it based on the well sorted bookmarks list.

@ichnilatis-gr
Copy link
Contributor Author

For some reason, after having installed the last nightly versions (v2021.12.1-29 and v2021.12.1-41), highlights are not extracted from the book given above as example. The process takes place, but I cannot find the file in the clipboard folder. This problem doesn't exist for other pdf files.

Any idea?

@Frenzie
Copy link
Member

Frenzie commented Jan 10, 2022

@NiLuJe mentioned a conversion might still be missing in current nightlies or something?

@NiLuJe
Copy link
Member

NiLuJe commented Jan 10, 2022

That was an opds server added to the default list, IIRC, nothing to do with this ;).

@poire-z
Copy link
Contributor

poire-z commented Jan 21, 2022

Fixed by #8616.

@poire-z poire-z closed this as completed Jan 21, 2022
@poire-z poire-z added this to the 2022.02 milestone Jan 21, 2022
@ichnilatis-gr
Copy link
Contributor Author

ichnilatis-gr commented Apr 9, 2022

@hius07 , @Frenzie , @poire-z
I thought that this issue had been resolved, but today I noticed that it hasn't.
I give you (unfortunately for you in Greek) a page containing highlights and their view in the extracted file.
The order of the extracted highlights is the reverse of the order in the book.

Reader_2022-04-09_140248
Reader_2022-04-09_140533

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

No branches or pull requests

5 participants