2021-05-20 04:30:31 +02:00
|
|
|
= epubgrep
|
|
|
|
:showtitle:
|
|
|
|
:toc: preamble
|
|
|
|
:project: epubgrep
|
|
|
|
:uri-base: https://schlomp.space/tastytea/{project}
|
|
|
|
:uri-branch-main: {uri-base}/src/branch/main
|
|
|
|
|
|
|
|
:uri-gcc: https://gcc.gnu.org/
|
|
|
|
:uri-clang: https://clang.llvm.org/
|
|
|
|
:uri-cmake: https://cmake.org/
|
|
|
|
:uri-catch: https://github.com/catchorg/Catch2
|
2021-05-20 09:59:15 +02:00
|
|
|
:uri-boost: https://www.boost.org/
|
2021-05-20 07:58:42 +02:00
|
|
|
:uri-gettext: https://www.gnu.org/software/gettext/
|
2021-05-21 01:56:37 +02:00
|
|
|
:uri-libarchive: https://www.libarchive.org/
|
2021-05-21 03:25:42 +02:00
|
|
|
:uri-fmt: https://github.com/fmtlib/fmt
|
2021-05-23 06:35:04 +02:00
|
|
|
:uri-asciidoc: http://asciidoc.org/
|
2021-05-25 11:05:46 +02:00
|
|
|
:uri-termcolor: https://termcolor.readthedocs.io/
|
2021-05-29 15:50:03 +02:00
|
|
|
:uri-pugixml: https://pugixml.org/
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 11:08:08 +02:00
|
|
|
:license: https://schlomp.space/tastytea/{project}/src/branch/main/LICENSE
|
|
|
|
:license-termcolor: https://schlomp.space/tastytea/{project}/src/branch/main/dist/termcolor/LICENSE
|
|
|
|
|
|
|
|
*{project}* 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 don't
|
|
|
|
have to worry about HTML tags in the text.
|
|
|
|
|
2021-05-25 12:45:27 +02:00
|
|
|
{project} is licensed under the link:{license}[AGPL-3.0-only]. The bundled
|
|
|
|
link:{uri-termcolor}[Termcolor] is licensed under the
|
2021-05-25 11:08:08 +02:00
|
|
|
link:{license-termcolor}[BSD-3-Clause] license.
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 12:02:18 +02:00
|
|
|
== Usage
|
|
|
|
|
2021-05-25 12:49:28 +02:00
|
|
|
[alt="Screenshot of epubgrep, showing the output of 2 book searches."]
|
2021-05-25 11:43:20 +02:00
|
|
|
image::{uri-base}/raw/branch/main/screenshot.png[]
|
|
|
|
|
2021-05-25 12:02:18 +02:00
|
|
|
See
|
|
|
|
https://schlomp.space/tastytea/{project}/src/branch/main/man/{project}.1.adoc[man
|
|
|
|
page] for more information.
|
2021-05-23 06:35:04 +02:00
|
|
|
|
2021-05-20 04:30:31 +02:00
|
|
|
== Install
|
|
|
|
|
|
|
|
[alt="Packaging status" link=https://repology.org/project/epubgrep/versions]
|
|
|
|
image::https://repology.org/badge/vertical-allrepos/epubgrep.svg[]
|
|
|
|
|
2021-05-25 11:52:22 +02:00
|
|
|
=== Gentoo
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 11:52:22 +02:00
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
2021-05-25 18:04:44 +02:00
|
|
|
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
|
2021-05-25 11:52:22 +02:00
|
|
|
--------------------------------------------------------------------------------
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 19:07:00 +02:00
|
|
|
=== Debian and Ubuntu
|
|
|
|
|
2021-05-25 18:07:12 +02:00
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
wget -O - https://tastytea.de/tastytea.asc | sudo apt-key add -
|
2021-05-28 09:50:18 +02:00
|
|
|
sudo add-apt-repository 'deb https://apt.schlomp.space/[code name] [code name] main'
|
2021-05-25 18:07:12 +02:00
|
|
|
sudo apt install epubgrep
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2021-05-28 09:50:18 +02:00
|
|
|
Replace _[code name]_ with the code name of your installation. Packages are
|
|
|
|
available for *buster* (Debian 10), *focal* (Ubuntu 20.04) and *bionic* (Ubuntu
|
|
|
|
18.04).
|
|
|
|
|
2021-05-25 18:07:12 +02:00
|
|
|
[TIP]
|
|
|
|
If you get the error message that `add-apt-repository` was not found, install
|
|
|
|
`software-properties-common`.
|
|
|
|
|
2021-05-20 04:30:31 +02:00
|
|
|
=== From source
|
|
|
|
|
|
|
|
==== Dependencies
|
|
|
|
|
|
|
|
* Tested OS: Linux
|
2021-05-27 17:43:23 +02:00
|
|
|
* C\++ compiler with C++17 support (tested: link:{uri-gcc}[GCC] 8/10,
|
2021-05-20 04:30:31 +02:00
|
|
|
link:{uri-clang}[clang] 6/11)
|
2021-05-25 07:30:34 +02:00
|
|
|
* link:{uri-cmake}[CMake] (at least: 3.12)
|
2021-05-20 09:59:15 +02:00
|
|
|
* link:{uri-boost}[Boost] (tested: 1.75.0 / 1.65.0)
|
|
|
|
* link:{uri-gettext}[gettext] (tested: 0.21 / 0.19)
|
2021-05-21 01:56:37 +02:00
|
|
|
* link:{uri-libarchive}[libarchive] (tested: 3.5 / 3.2)
|
2021-05-21 03:25:42 +02:00
|
|
|
* link:{uri-fmt}[fmt] (tested: 7.0 / 4.0)
|
2021-05-27 17:43:23 +02:00
|
|
|
* link:{uri-asciidoc}[AsciiDoc] (tested: 9.0 / 8.6)
|
2021-05-25 11:55:18 +02:00
|
|
|
* link:{uri-termcolor}[Termcolor] (tested: 2.0) (If not found, the bundled
|
|
|
|
version is used.)
|
2021-05-29 15:50:03 +02:00
|
|
|
* link:{uri-pugixml}[pugixml] (tested: 1.11 / 1.8)
|
2021-05-20 04:30:31 +02:00
|
|
|
* Optional
|
2021-05-20 10:43:51 +02:00
|
|
|
** Tests: link:{uri-catch}[Catch] (tested: 2.13 / 1.10)
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 19:51:15 +02:00
|
|
|
===== Install dependencies in Debian or Ubuntu
|
2021-05-25 14:20:45 +02:00
|
|
|
|
|
|
|
Or distributions that are derived from Debian or Ubuntu. You will need at least
|
2021-05-25 19:51:15 +02:00
|
|
|
Debian buster (10) or Ubuntu focal (20.04), unless you install a newer version
|
|
|
|
of CMake.
|
2021-05-25 14:20:45 +02:00
|
|
|
|
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
2021-05-29 15:50:03 +02:00
|
|
|
sudo apt install build-essential cmake libboost-program-options-dev \
|
|
|
|
libboost-locale-dev libboost-regex-dev gettext libarchive-dev \
|
|
|
|
libfmt-dev asciidoc libpugixml-dev
|
2021-05-25 14:20:45 +02:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2021-05-20 04:30:31 +02:00
|
|
|
==== Get sourcecode
|
|
|
|
|
2021-05-25 07:22:34 +02:00
|
|
|
===== Release
|
2021-05-20 04:30:31 +02:00
|
|
|
|
2021-05-25 07:22:34 +02:00
|
|
|
Download the current release at link:{uri-base}/releases[schlomp.space].
|
2021-05-20 04:30:31 +02:00
|
|
|
|
|
|
|
===== Development version
|
|
|
|
|
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
git clone https://schlomp.space/tastytea/epubgrep.git
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
==== Compile
|
|
|
|
|
2021-05-25 14:20:45 +02:00
|
|
|
In a terminal, go to the directory where you unpacked / cloned the source code
|
|
|
|
and then:
|
|
|
|
|
2021-05-20 04:30:31 +02:00
|
|
|
[source,shell]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
mkdir -p build && cd build
|
|
|
|
cmake ..
|
|
|
|
cmake --build . -- --jobs=$(nproc --ignore=1)
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2021-05-26 10:18:45 +02:00
|
|
|
To install, run `sudo make install`. To run the tests, run `cd tests &&
|
|
|
|
ctest`.
|
|
|
|
|
|
|
|
[TIP]
|
|
|
|
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`.
|
2021-05-25 14:20:45 +02:00
|
|
|
|
2021-05-20 04:30:31 +02:00
|
|
|
.CMake options:
|
|
|
|
* `-DCMAKE_BUILD_TYPE=Debug` for a debug build.
|
|
|
|
* `-DWITH_TESTS=YES` if you want to compile the tests.
|
2021-05-20 08:06:38 +02:00
|
|
|
* `-DXGETTEXT_CMD=String` The program to use instead of `xgettext`.
|
2021-05-25 12:04:22 +02:00
|
|
|
* `-DFALLBACK_BUNDLED=NO` if you don't want to fall back on bundled libraries.
|
2021-05-20 04:30:31 +02:00
|
|
|
|
|
|
|
include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]
|