aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFArgParser.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-11 17:49:33 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commitc8729398ddb9ac82b00bbafaf24e8d37543e5b9e (patch)
tree9f1931af7f1087f503737f45ed04b3745812cae2 /libqpdf/QPDFArgParser.cc
parentb4bd124be496170937d19742d83c2bad7471fe81 (diff)
downloadqpdf-c8729398ddb9ac82b00bbafaf24e8d37543e5b9e.tar.zst
Generate help content from manual
This is a massive rewrite of the help text and cli.rst section of the manual. All command-line flags now have their own help and are specifically index. qpdf --help is completely redone.
Diffstat (limited to 'libqpdf/QPDFArgParser.cc')
-rw-r--r--libqpdf/QPDFArgParser.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/libqpdf/QPDFArgParser.cc b/libqpdf/QPDFArgParser.cc
index 69a97a5c..8d7c978c 100644
--- a/libqpdf/QPDFArgParser.cc
+++ b/libqpdf/QPDFArgParser.cc
@@ -967,21 +967,20 @@ void
QPDFArgParser::getAllHelp(std::ostringstream& msg)
{
getTopHelp(msg);
- auto show = [this, &msg](std::map<std::string, HelpTopic>& topics,
- std::string const& label) {
+ auto show = [this, &msg](std::map<std::string, HelpTopic>& topics) {
for (auto const& i: topics)
{
auto const& topic = i.first;
msg << std::endl
- << "== " << label << " " << topic
+ << "== " << topic
<< " (" << i.second.short_text << ") =="
<< std::endl
<< std::endl;
getTopicHelp(topic, i.second, msg);
}
};
- show(this->m->help_topics, "topic");
- show(this->m->option_help, "option");
+ show(this->m->help_topics);
+ show(this->m->option_help);
msg << std::endl << "====" << std::endl;
}