Search tool for EPUB e-books
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
tastytea 1eb763fc37
Mention bullseye-packages in apt-repo.
2 years ago
cmake Re-enabled address sanitizer. 2 years ago
dist/termcolor Merge commit '6c33fb4dcebd5464d89ca3fb98bdf23847d81fbf' as 'dist/termcolor' 2 years ago
man Remove pseudo-HTML bug from man page. 2 years ago
src Make HTML entity map static. 2 years ago
tests Mixed up types. 2 years ago
translations Bump version of german translation. 2 years ago
.clang-format Add .clang-tify and .clang-format. 2 years ago
.clang-tidy Add .clang-tify and .clang-format. 2 years ago
.drone.yml Add automatic package generation for Debian bullseye (11). 2 years ago
.editorconfig Clean up .editorconfig. 2 years ago
.gitignore Ignore CMake user presets. 2 years ago
AUTHORS Initial commit. 2 years ago
CMakeLists.txt Version bump 0.5.1. 2 years ago
CMakePresets.json CMake: Add presets for GCC and clang. 2 years ago
CODE_OF_CONDUCT.adoc Initial commit. 2 years ago
CONTRIBUTING.adoc Update rebuild-commands in translator guide. 2 years ago
CREDITS Update credits. 2 years ago
LICENSE Squashed 'dist/termcolor/' content from commit 9a832a1 2 years ago
README.adoc Mention bullseye-packages in apt-repo. 2 years ago
screenshot.png Update screenshot. 2 years ago



epubgrep is a search tool for EPUB e-books. It does not operate on lines, but on whole files. All newlines will be replaced by spaces and HTML will be stripped. This means you can search for text spanning multiple lines and dont have to worry about HTML tags in the text.

epubgrep is licensed under the AGPL-3.0-only. The bundled Termcolor is licensed under the BSD-3-Clause license.


Screenshot of epubgrep, showing the output of 2 book searches.

See man page for more information.


Packaging status


sudo eselect repository enable guru
echo 'app-text/epubgrep' | sudo tee -a /etc/portage/package.accept_keywords/epubgrep
sudo emaint sync -r guru
sudo emerge -a app-text/epubgrep

Debian and Ubuntu

wget -O - | sudo apt-key add -
sudo add-apt-repository 'deb[code name] [code name] main'
sudo apt install epubgrep

Replace [code name] with the code name of your installation. Packages are available for bullseye (Debian 11), buster (Debian 10), focal (Ubuntu 20.04) and bionic (Ubuntu 18.04).

If you get the error message that add-apt-repository was not found, install software-properties-common.

From source


  • Tested OS: Linux

  • C++ compiler with C++17 support (tested: GCC 8/10, clang 6/11)

  • CMake (at least: 3.12)

  • Boost (tested: 1.75.0 / 1.65.0)

  • gettext (tested: 0.21 / 0.19)

  • libarchive (tested: 3.5 / 3.2)

  • fmt (tested: 7.0 / 4.0)

  • AsciiDoc (tested: 9.0 / 8.6)

  • Termcolor (tested: 2.0) (If not found, the bundled version is used.)

  • pugixml (tested: 1.11 / 1.8)

  • nlohmann_json (tested: 3.9 / 2.1)

  • Optional

    • Tests: Catch (tested: 2.13 / 1.10)

Install dependencies in Debian or Ubuntu

Or distributions that are derived from Debian or Ubuntu. You will need at least Debian buster (10) or Ubuntu focal (20.04), unless you install a newer version of CMake.

sudo apt install build-essential cmake libboost-program-options-dev \
                 libboost-locale-dev libboost-regex-dev libboost-log-dev \
                 gettext libarchive-dev libfmt-dev asciidoc libpugixml-dev \
If nlohmann-json-dev can not be found, try nlohmann-json3-dev.

Get sourcecode


Download the current release at

Development version
git clone


In a terminal, go to the directory where you unpacked / cloned the source code and then:

cmake -S . -B build
cmake --build build --parallel $(nproc --ignore=1)

To install, run sudo cmake --install build. To run the tests, run ctest --test-dir build.

If you are using Debian or Ubuntu, or a distribution that is derived from these, you can run cpack -G DEB in the build directory to generate a .deb-file. You can then install it with apt install ./epubgrep-*.deb.
CMake options:
  • -DCMAKE_BUILD_TYPE=Debug for a debug build.

  • -DWITH_TESTS=YES if you want to compile the tests.

  • -DXGETTEXT_CMD=String The program to use instead of xgettext.

  • -DFALLBACK_BUNDLED=NO if you dont want to fall back on bundled libraries.