2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

cli.rst: remove () from end of short help

This is used to generate a schema for the job json, which can't
contain `)"` because it breaks the R"(...)" syntax in C++. While C++
accepts R"anything(...)anything" to avoid this, as of this writing,
MSVC 2019 doesn't understand that. For now, just avoid it by removing
parentheses from the end of short help.
This commit is contained in:
Jay Berkenbilt 2022-01-22 15:39:54 -05:00
parent 8dea480c9f
commit 67f9d0b7d5
3 changed files with 14 additions and 6 deletions

View File

@ -2,7 +2,7 @@
generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b
job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a
libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a
libqpdf/qpdf/auto_job_help.hh 3a56e34d54dd3a7ea9e248d0fbc9ed6923c30f3c4bb455e2f0894b2f7fb14c72
libqpdf/qpdf/auto_job_help.hh 2653faaf59415bec81c3a85d426239d52b609ac24faba34ec2d26f00710dd2c6
libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad
manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d
manual/cli.rst ce761433f0f84c379d9509c9fc4cb8ed08556ecf8f2fe22bb4a6146f3041439d
manual/cli.rst b136c7f33a538c580b081a7e802c27635aad2a4229efa0eb0736466116b7aa90

View File

@ -366,7 +366,7 @@ Don't optimize images whose area in pixels is below the specified value.
)");
ap.addOptionHelp("--keep-inline-images", "modification", "exclude inline images from optimization", R"(Prevent inline images from being considered by --optimize-images.
)");
ap.addOptionHelp("--remove-page-labels", "modification", "remove page labels (numbers)", R"(Exclude page labels (explicit page numbers) from the output file.
ap.addOptionHelp("--remove-page-labels", "modification", "remove explicit page numbers", R"(Exclude page labels (explicit page numbers) from the output file.
)");
ap.addHelpTopic("encryption", "create encrypted files", R"(Create encrypted files. Usage:
@ -674,7 +674,7 @@ Specify the attachment's modification date in PDF format;
defaults to the current time. Run qpdf --help=pdf-dates for
information about the date format.
)");
ap.addOptionHelp("--mimetype", "add-attachment", "attachment mime type (e.g. application/pdf)", R"(--mimetype=type/subtype
ap.addOptionHelp("--mimetype", "add-attachment", "attachment mime type, e.g. application/pdf", R"(--mimetype=type/subtype
Specify the mime type for the attachment, such as text/plain,
application/pdf, image/png, etc.

View File

@ -13,6 +13,14 @@
for additional help. Command line arguments can be referenced using
:qpdf:ref:`--option`. They also appear in an index.
Note: 2022-01-22: because short help text is used in the "schema"
json object for QPDFJob json, we can't end short text with a ``)``
character since doing so would cause ``)"`` to appear in the string
literal. We use the R"(...)" syntax for these literals, and that
looks like an end delimiter. While the C++ spec allows
R"anything(...)anything" specifically for this purpose, the MSVC in
CI at the time of this writing did not support that construct.
STYLE NOTES
In this text, :samp:`...` and ``...`` are used somewhat
@ -1643,7 +1651,7 @@ Related Options
.. qpdf:option:: --remove-page-labels
.. help: remove page labels (numbers)
.. help: remove explicit page numbers
Exclude page labels (explicit page numbers) from the output file.
@ -2707,7 +2715,7 @@ These options are valid between :qpdf:ref:`--add-attachment` and ``--``.
.. qpdf:option:: --mimetype=type/subtype
.. help: attachment mime type (e.g. application/pdf)
.. help: attachment mime type, e.g. application/pdf
Specify the mime type for the attachment, such as text/plain,
application/pdf, image/png, etc.