aboutsummaryrefslogtreecommitdiffstats
path: root/README-maintainer
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-11 21:52:58 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commit5c5e5ca29b20877614d9b1c025b86707e67e548b (patch)
tree9c0add5fdf31424e31b222ea3745576b6989bbbb /README-maintainer
parentc8729398ddb9ac82b00bbafaf24e8d37543e5b9e (diff)
downloadqpdf-5c5e5ca29b20877614d9b1c025b86707e67e548b.tar.zst
Document how to add a command-line argument
Diffstat (limited to 'README-maintainer')
-rw-r--r--README-maintainer25
1 files changed, 25 insertions, 0 deletions
diff --git a/README-maintainer b/README-maintainer
index 31634229..d5801070 100644
--- a/README-maintainer
+++ b/README-maintainer
@@ -122,6 +122,31 @@ CODING RULES
since those have to get copied around a lot.
+HOW TO ADD A COMMAND-LINE ARGUMENT
+
+Command-line arguments are closely coupled with QPDFJob. To add a new
+command-line argument, add the option to the appropriate table in
+job.yml. This will automatically declare a method in the private
+ArgParser class in QPDFJob_argv.cc which you have to implement. The
+implementation should make calls to methods in QPDFJob.
+
+The build will fail until the new option is documented in
+manual/cli.rst. To do that, create documentation for the option by
+adding a ".. qpdf:option::" directive followed by a magic help comment
+as described at the top of manual/cli.rst. Put this in the correct
+help topic. Help topics roughly correspond with sections in that
+chapter and are created using a special ".. help-topic" comment.
+Follow the example of other options for style.
+
+When done, the following should happen:
+
+* qpdf --new-option should work as expected
+* qpdf --help=--new-option should show the help from the comment in cli.rst
+* qpdf --help=topic should list --new-option for the correct topic
+* --new-option should appear in the manual
+* --new-option should be in the command-line option index in the manual
+
+
RELEASE PREPARATION
* Each year, update copyright notices. This will find all relevant