Add --raw and --context switches.
This commit is contained in:
parent
c2ca311ac9
commit
f388dd0511
|
@ -2,7 +2,7 @@
|
|||
:doctype: manpage
|
||||
:Author: tastytea
|
||||
:Email: tastytea@tastytea.de
|
||||
:Date: 2021-05-23
|
||||
:Date: 2021-05-24
|
||||
:Revision: 0.0.0
|
||||
:man source: epubgrep
|
||||
:man manual: General Commands Manual
|
||||
|
@ -49,6 +49,12 @@ Ignore case distinctions in pattern and data.
|
|||
*-e* _PATTERN_, *--regexp* _PATTERN_::
|
||||
Use additional _PATTERN_ for matching. Can be used more than once.
|
||||
|
||||
*-a*, *--raw*::
|
||||
Do not strip HTML before searching.
|
||||
|
||||
*-C* _NUM_, **context* _NUM_::
|
||||
Print _NUM_ words of context around matches.
|
||||
|
||||
== USAGE
|
||||
|
||||
=== Configuration
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <boost/program_options/value_semantic.hpp>
|
||||
#include <boost/program_options/variables_map.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
|
@ -65,6 +66,11 @@ po::variables_map parse_options(int argc, char *argv[])
|
|||
("regexp,e", po::value<std::vector<std::string>>()
|
||||
->value_name(translate("PATTERN"))->composing()->required(),
|
||||
translate("Use additional PATTERN for matching.").str().data())
|
||||
("raw,a",
|
||||
translate("Do not strip HTML before searching.").str().data())
|
||||
("context,C", po::value<std::vector<std::uint64_t>>()
|
||||
->value_name(translate("NUM")),
|
||||
translate("Print NUM words of context around matches.").str().data())
|
||||
;
|
||||
|
||||
po::options_description options_hidden("Hidden options");
|
||||
|
|
Loading…
Reference in New Issue
Block a user