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

EPUB progress indicator #2784

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

quarz12
Copy link
Contributor

@quarz12 quarz12 commented May 15, 2023

this draft aims to implement #2765
My idea for achieving this is to compare the bytesize of all html files to the ones already read +the read percentage of the current book. while this does not give a 100% accurate representation as it counts the entire xml-tree instead of just the text fields , I think for this purpose it is more than good enough.

@quarz12 quarz12 marked this pull request as ready for review May 24, 2023 20:00
@quarz12
Copy link
Contributor Author

quarz12 commented Jun 5, 2023

I found out that the percentage calculation could be done with the already included epub.min.js lib. This has the one downside that it has to build an index on load and therefore takes a few seconds to show the correct position when opening a book. However it means the other two libs I added before could be removed and the implementation is a lot simpler

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

Successfully merging this pull request may close these issues.

None yet

1 participant