Commit Graph

301 Commits

Author SHA1 Message Date
c99c01162d
Silence some clang-tidy warnings.
- Thread-unsafe std::getenv and std::setlocale doesn't matter for us.
- It is unlikely that we can make main() less complex without making it more
  complex elsewhere.
- Thread-unsafe std::strerror stays unsolved for now.
2021-06-29 01:58:53 +02:00
49de44f729
Remove generator from CMake presets. 2021-06-29 01:22:46 +02:00
bdcf153b47
Fix usage quick-help.
All checks were successful
continuous-integration/drone/push Build is passing
FILE is not optional.
2021-06-26 15:14:57 +02:00
57c87ca5e7
Fix typo in german translation.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-24 19:20:07 +02:00
5c0ca46c9d
Version bump 0.6.0.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-24 18:48:37 +02:00
691dea092d
typo.
# Previous commits:
#   07ec6f7 Update german translation.
#   979dc93 Re-order --help messages.
#   961deff Add --status and --status-interval.
#   1cf6306 Add linter-exception for EXIT_FATAL.
2021-06-24 18:48:22 +02:00
07ec6f789f
Update german translation. 2021-06-24 18:48:08 +02:00
979dc9334c
Re-order --help messages.
Divided them into 3 categories:
  - general
  - search
  - output

Closes: #12
2021-06-24 18:34:07 +02:00
961deff41d
Add --status and --status-interval.
--status prints a status message to stderr at regular intervals.
--status-interval sets the interval for status messages.

Closes: #10
2021-06-24 18:13:40 +02:00
1cf6306f4b
Add linter-exception for EXIT_FATAL. 2021-06-24 13:16:18 +02:00
822bff1955
Don't crash on regex errors.
All checks were successful
continuous-integration/drone/push Build is passing
The error will be reported once for each initial thread.

Closes: #14
2021-06-24 13:13:49 +02:00
18c3d8f58d
Do not show prefix in output if there is no metadata.
Previously epubgrep would output “: match” instead of “match”.

Closes: #15
2021-06-24 12:53:09 +02:00
b2a6f9217b
Add examples to man page. 2021-06-24 12:34:48 +02:00
babd7e4f61
Ignore dap-mode file.
dap-mode is an Emacs-mode for debugging, the file describes which debugger to
use and how to start the program.
2021-06-22 17:23:26 +02:00
ed86f3a56d
Add link to HTML version of of the man page. 2021-06-08 20:35:32 +02:00
f8270369b6
Make whitespace-reduction a bit more efficient.
All checks were successful
continuous-integration/drone/push Build is passing
We now use 2 passes instead of 3.
2021-06-08 17:30:29 +02:00
3966b99c3f
Update german translation. 2021-06-08 17:12:26 +02:00
37c2fe1bb1
Add HTML output.
All checks were successful
continuous-integration/drone/push Build is passing
Prints a simple HTML document with tables wrapped in articles to stdout.

Closes: #9
2021-06-08 17:11:32 +02:00
a77b90c8b1
Document output::json_all(). 2021-06-08 04:26:29 +02:00
42e5e52e1b
Update dependencies-on-debian section in readme.
All checks were successful
continuous-integration/drone/push Build is passing
There are more hacks required on bionic.
2021-06-07 15:47:03 +02:00
1eb763fc37
Mention bullseye-packages in apt-repo. 2021-06-07 15:08:20 +02:00
633274e3dd
Version bump 0.5.1. 2021-06-07 15:05:16 +02:00
51f8422929
Make HTML entity map static.
All checks were successful
continuous-integration/drone/push Build is passing
Drastically reduces allocations.
2021-06-07 01:20:29 +02:00
8b5c0d289e
print_matches(): Don't check file name for each match.
We only process one file at a time.
2021-06-07 01:09:37 +02:00
7b817c42d1
Remove pseudo-HTML bug from man page. 2021-06-07 01:06:51 +02:00
be4d8aecd0
Mixed up types. 2021-06-07 00:44:42 +02:00
1c8279f96f
Add test that asks for more context than is available.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-07 00:05:33 +02:00
f59c86e20d
Don't search for whitespace beyond the start/end of the text. 2021-06-06 23:48:06 +02:00
0470acb00e
Make --raw work again.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-06 22:37:09 +02:00
1e29608c7e
Fix positioning of matches in search::search(). 2021-06-06 22:34:52 +02:00
5e89a71e00
Update tests for search::headline() and search::page(). 2021-06-06 22:11:45 +02:00
9708bb69c8
Don't attempt to access a pointer to nowhere. 2021-06-06 21:34:48 +02:00
b8431019b7
Don't inject page numbers and headline-markers into the text.
Some checks failed
continuous-integration/drone/push Build is failing
The metadata is recorded in position → data pairs.

Closes: #13
2021-06-06 21:26:09 +02:00
ebb8b63830
Mention inserted page markers in man page.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-06 16:14:50 +02:00
a49c500d0f
Fix <style> and <script> erasure.
I didn't take into account that <script […]/> is possible.
2021-06-06 16:06:14 +02:00
262aab6671
Add debug log for replacements. 2021-06-06 15:52:09 +02:00
9067b387ef
Fix pagebreak-iterators.
Oopsie! 😄
2021-06-06 15:50:13 +02:00
99e1cd8e98
Re-enabled address sanitizer.
All checks were successful
continuous-integration/drone/push Build is passing
Found out what was wrong: I fed boost::regex_search() the pointer to a substring
that was created in-place. match[2] was a pointer to a substring inside that.

The problem was, that match was declared outside of the if-block. So after the
if-block match[2] would point to a now freed memory address. It didn't have any
effects because I didn't use match afterwards.

I rewrote the whole thing with iterators. Slightly less readable, slightly
better performance (probably).
2021-06-05 17:45:07 +02:00
bdf9a86651
Fix pagebreak-regex and range in which pagebreaks are searched. 2021-06-05 17:18:35 +02:00
f1a0015f28
Disable address sanitizer.
It complains about boost/regex/v5/sub_match.hpp:57:30 and I can't figure out
what's wrong or how to ignore it.
2021-06-05 14:24:53 +02:00
fbf86f51d1
CMake: Add presets for GCC and clang.
# Previous commits:
#   d630fe9 Make text formatting more readable.
#   4026937 Don't return pointer to freed memory address.
#   cb2aee8 Add address sanitizer to debug flags.
#   4b09158 Add automatic package generation for Debian bullseye (11).

# Previous commits:
#   12e1c64 Make text formatting more readable.
#   4026937 Don't return pointer to freed memory address.
#   cb2aee8 Add address sanitizer to debug flags.
#   4b09158 Add automatic package generation for Debian bullseye (11).
2021-06-05 13:34:52 +02:00
12e1c64fc0
Make text formatting more readable. 2021-06-05 13:34:48 +02:00
4026937f08
Don't return pointer to freed memory address. 2021-06-04 23:14:36 +02:00
cb2aee847f
Add address sanitizer to debug flags. 2021-06-04 23:08:50 +02:00
4b09158037
Add automatic package generation for Debian bullseye (11). 2021-06-04 15:18:32 +02:00
226b66b77b
Update maximum supported CMake version.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-04 14:39:53 +02:00
92b8281242
Fix CI recipe.
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-03 16:18:01 +02:00
2b51229518
Change ctest verbosity to default.
Some checks failed
continuous-integration/drone/push Build is failing
2021-06-03 15:57:56 +02:00
bc34a3a515
Make ctest work from build directory. 2021-06-03 15:56:08 +02:00
85a00bb23c
Add CMake presets. 2021-06-03 15:44:31 +02:00