From c8729398ddb9ac82b00bbafaf24e8d37543e5b9e Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 11 Jan 2022 11:49:33 -0500 Subject: 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. --- libqpdf/QPDFArgParser.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libqpdf/QPDFArgParser.cc') 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& topics, - std::string const& label) { + auto show = [this, &msg](std::map& 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; } -- cgit v1.2.3-54-g00ecf