bookworm icon indicating copy to clipboard operation
bookworm copied to clipboard

Ctrl + F search returns, "No matches found".

Open wolfv6 opened this issue 1 year ago • 2 comments

Ctrl + F search results always returns, "No matches found". For example, searching for "money" in the epub book "Kiss Your Money Hello!" finds "No matches found for 'money' in Kiss Your Money Hello!"

I am running Bookworm 1.1.2 on Fedora 38. I installed Bookworm from GNOME Software.

I started Bookworm in debug mode from the terminal:

$ com.github.babluboy.bookworm —debug
...
[WARNING 22:47:21.671581] bookworm.vala:681: EBook not found at provided location:—debug

Then I clicked on the book, and it displayed the book's text as usual. Then I search "money" and the terminal displays 20 warnings of:

[WARNING 22:49:28.397240] utils.vala:95: Execution of sync command [/usr/share/com.github.babluboy.bookworm/scripts/tasks/com.github.babluboy.bookworm.search.sh "/home/wolfv/.local/share/com.github.babluboy.bookworm/books/Kiss_Your_Money_Hello20230424.epub/OEBPS/Dedication.xhtml" "money"]: exited with non zero error code[256]. Error message:/usr/share/com.github.babluboy.bookworm/scripts/tasks/com.github.babluboy.bookworm.search.sh: line 8: html2text: command not found

This issue seems to be related to https://github.com/babluboy/bookworm/issues/260

wolfv6 avatar May 10 '23 04:05 wolfv6

Thanks for raising this issue - not sure why html2text is not installed - its required for the search. Could you please try installing html2text on your machine and try again. Installation instructions for Ubuntu are here: https://installati.one/install-html2text-ubuntu-20-04, hopefully this package is available for Fedora

babluboy avatar Nov 29 '23 08:11 babluboy

I installed html2text. Book worm still says "No matches found for 'money' in Kiss Your Money Hello!".

The error message in debug mode is different: [WARNING 03:54:47.336191] utils.vala:95: Execution of sync command [/usr/share/com.github.babluboy.bookworm/scripts/tasks/com.github.babluboy.bookworm.search.sh "/home/wolfv/.local/share/com.github.babluboy.bookworm/books/Kiss_Your_Money_Hello20230424.epub/OEBPS/yyjz6VWbUjKuDFv9.xhtml" "money"]: exited with non zero error code[256]. Error message:usage: html2text [-h] [--default-image-alt DEFAULT_IMAGE_ALT] [--pad-tables] [--no-wrap-links] [--wrap-list-items] [--ignore-emphasis] [--reference-links] [--ignore-links] [--protect-links] [--ignore-images] [--images-as-html] [--images-to-alt] [--images-with-size] [-g] [-d] [-e] [-b BODY_WIDTH] [-i LIST_INDENT] [-s] [--escape-all] [--bypass-tables] [--ignore-tables] [--single-line-break] [--unicode-snob] [--no-automatic-links] [--no-skip-internal-links] [--links-after-para] [--mark-code] [--decode-errors DECODE_ERRORS] [--open-quote OPEN_QUOTE] [--close-quote CLOSE_QUOTE] [--version] [filename] [encoding]html2text: error: unrecognized arguments: -utf8

wolfv6 avatar Nov 29 '23 10:11 wolfv6