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

Search epub text #2255

Merged
merged 3 commits into from
Oct 28, 2023
Merged

Search epub text #2255

merged 3 commits into from
Oct 28, 2023

Conversation

MxMarx
Copy link
Contributor

@MxMarx MxMarx commented Oct 27, 2023

Adds a search box in the table of contents sidebar to search for text within epubs.

Search results are displayed under the chapter they are found in, but at the moment, only the first two chapter levels are displayed in the ToC, so search results in chapters more than two levels deep won't appear. I could see about using a recursive component to display ToC entries instead, although I haven't found a book with more than three chapter levels yet.

This also makes adds a flattenChapters method, which converts ebook chapters into something that looks like audiobook chapters so that the seek bar will work with ebooks too (in a future pull request)

Closes #2045

image

@advplyr
Copy link
Owner

advplyr commented Oct 28, 2023

This is great. Works well on all of my books.

The only thing I noticed is that if the locations aren't loaded yet when first opening the search will only show the last chapter at the top. This was too minor for me to look into but worth noting.

Thanks for this feature!

@advplyr advplyr merged commit a9f74ac into advplyr:master Oct 28, 2023
1 check passed
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.

[Enhancement]: search in ebooks
2 participants