From 5a01a260c368d3045f0870cc09620a772027e911 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jan 2016 12:50:12 +0200 Subject: Initial support for plain text documentation (--generate-txt) Support for option documentation generation is still a TODO. --- cli/options.cli | 66 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 13 deletions(-) (limited to 'cli/options.cli') diff --git a/cli/options.cli b/cli/options.cli index 32a2794..20e1987 100644 --- a/cli/options.cli +++ b/cli/options.cli @@ -92,8 +92,8 @@ class options bool --generate-cxx { - "Generate C++ code. If neither \cb{--generate-man} nor \cb{--generate-html} - is specified, this mode is assumed by default." + "Generate C++ code. If neither \cb{--generate-man}, \cb{--generate-html}, + nor \cb{--generate-txt} is specified, this mode is assumed by default." }; bool --generate-man @@ -106,6 +106,11 @@ class options "Generate documentation in the HTML format." }; + bool --generate-txt + { + "Generate documentation in the plain text format, similar to usage." + }; + bool --stdout { "Write output to STDOUT instead of a file. This option is not valid @@ -198,23 +203,24 @@ class options class . The value should be a fully-qualified class name, for example, \cb{app::options}. The value can be \cb{short}, \cb{long}, or \cb{exclude}. If the value is \cb{exclude}, then the - class documentation is excluded from usage and man/HTML output. For + class documentation is excluded from usage and man/HTML/text output. For usage, the \cb{short} and \cb{long} values determine which usage function will be called when the class is used as base or as part of - the page usage (see \cb{--page-usage}). For man/HTML, these values + the page usage (see \cb{--page-usage}). For man/HTML/text, these values determine which documentation strings are used in the output." }; std::vector --class { "", - "Generate the man page or HTML documentation only for the options class - . The value should be a fully-qualified options class name, - for example, \cb{app::options}. To generate documentation for multiple - classes, repeat this option and the documentation will be produced in - the order specified. This functionality is useful if you need to assemble - documentation from multiple classes in a specific order or to insert - custom documentation between options belonging to different classes." + "Generate the man page, HTML, or text documentation only for the options + class . The value should be a fully-qualified options class + name, for example, \cb{app::options}. To generate documentation for + multiple classes, repeat this option and the documentation will be + produced in the order specified. This functionality is useful if you need + to assemble documentation from multiple classes in a specific order or to + insert custom documentation between options belonging to different + classes." }; std::map --docvar|-v @@ -260,6 +266,12 @@ class options "Insert at the beginning of the generated HTML file." }; + std::vector --txt-prologue + { + "", + "Insert at the beginning of the generated text file." + }; + // Epilogues. // std::vector --hxx-epilogue @@ -283,13 +295,19 @@ class options std::vector --man-epilogue { "", - "Insert at the end of the generated man page text." + "Insert at the end of the generated man page file." }; std::vector --html-epilogue { "", - "Insert at the end of the generated HTML text." + "Insert at the end of the generated HTML file." + }; + + std::vector --txt-epilogue + { + "", + "Insert at the end of the generated text file." }; // Prologue files. @@ -329,6 +347,13 @@ class options file." }; + std::string --txt-prologue-file + { + "", + "Insert the content of at the beginning of the generated text + file." + }; + // Epilogue files. // std::string --hxx-epilogue-file @@ -364,6 +389,14 @@ class options "Insert the content of at the end of the generated HTML file." }; + std::string --txt-epilogue-file + { + "", + "Insert the content of at the end of the generated text file." + }; + + // Output. + // std::string --output-prefix { "", @@ -413,6 +446,13 @@ class options of the generated HTML file." }; + std::string --txt-suffix = ".txt" + { + "", + "Use instead of the default \cb{.txt} to construct the name of + the generated text file." + }; + std::string --option-prefix = "-" { "", -- cgit v1.1