Commit 67f9d0b7d5857a73c974f5a54cd1abbe65231fce

Authored by Jay Berkenbilt
1 parent 8dea480c

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.
job.sums
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b 2 generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b
3 job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a 3 job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a
4 libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a 4 libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a
5 -libqpdf/qpdf/auto_job_help.hh 3a56e34d54dd3a7ea9e248d0fbc9ed6923c30f3c4bb455e2f0894b2f7fb14c72 5 +libqpdf/qpdf/auto_job_help.hh 2653faaf59415bec81c3a85d426239d52b609ac24faba34ec2d26f00710dd2c6
6 libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad 6 libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad
7 manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d 7 manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d
8 -manual/cli.rst ce761433f0f84c379d9509c9fc4cb8ed08556ecf8f2fe22bb4a6146f3041439d 8 +manual/cli.rst b136c7f33a538c580b081a7e802c27635aad2a4229efa0eb0736466116b7aa90
libqpdf/qpdf/auto_job_help.hh
@@ -366,7 +366,7 @@ Don't optimize images whose area in pixels is below the specified value. @@ -366,7 +366,7 @@ Don't optimize images whose area in pixels is below the specified value.
366 )"); 366 )");
367 ap.addOptionHelp("--keep-inline-images", "modification", "exclude inline images from optimization", R"(Prevent inline images from being considered by --optimize-images. 367 ap.addOptionHelp("--keep-inline-images", "modification", "exclude inline images from optimization", R"(Prevent inline images from being considered by --optimize-images.
368 )"); 368 )");
369 -ap.addOptionHelp("--remove-page-labels", "modification", "remove page labels (numbers)", R"(Exclude page labels (explicit page numbers) from the output file. 369 +ap.addOptionHelp("--remove-page-labels", "modification", "remove explicit page numbers", R"(Exclude page labels (explicit page numbers) from the output file.
370 )"); 370 )");
371 ap.addHelpTopic("encryption", "create encrypted files", R"(Create encrypted files. Usage: 371 ap.addHelpTopic("encryption", "create encrypted files", R"(Create encrypted files. Usage:
372 372
@@ -674,7 +674,7 @@ Specify the attachment's modification date in PDF format; @@ -674,7 +674,7 @@ Specify the attachment's modification date in PDF format;
674 defaults to the current time. Run qpdf --help=pdf-dates for 674 defaults to the current time. Run qpdf --help=pdf-dates for
675 information about the date format. 675 information about the date format.
676 )"); 676 )");
677 -ap.addOptionHelp("--mimetype", "add-attachment", "attachment mime type (e.g. application/pdf)", R"(--mimetype=type/subtype 677 +ap.addOptionHelp("--mimetype", "add-attachment", "attachment mime type, e.g. application/pdf", R"(--mimetype=type/subtype
678 678
679 Specify the mime type for the attachment, such as text/plain, 679 Specify the mime type for the attachment, such as text/plain,
680 application/pdf, image/png, etc. 680 application/pdf, image/png, etc.
manual/cli.rst
@@ -13,6 +13,14 @@ @@ -13,6 +13,14 @@
13 for additional help. Command line arguments can be referenced using 13 for additional help. Command line arguments can be referenced using
14 :qpdf:ref:`--option`. They also appear in an index. 14 :qpdf:ref:`--option`. They also appear in an index.
15 15
  16 + Note: 2022-01-22: because short help text is used in the "schema"
  17 + json object for QPDFJob json, we can't end short text with a ``)``
  18 + character since doing so would cause ``)"`` to appear in the string
  19 + literal. We use the R"(...)" syntax for these literals, and that
  20 + looks like an end delimiter. While the C++ spec allows
  21 + R"anything(...)anything" specifically for this purpose, the MSVC in
  22 + CI at the time of this writing did not support that construct.
  23 +
16 STYLE NOTES 24 STYLE NOTES
17 25
18 In this text, :samp:`...` and ``...`` are used somewhat 26 In this text, :samp:`...` and ``...`` are used somewhat
@@ -1643,7 +1651,7 @@ Related Options @@ -1643,7 +1651,7 @@ Related Options
1643 1651
1644 .. qpdf:option:: --remove-page-labels 1652 .. qpdf:option:: --remove-page-labels
1645 1653
1646 - .. help: remove page labels (numbers) 1654 + .. help: remove explicit page numbers
1647 1655
1648 Exclude page labels (explicit page numbers) from the output file. 1656 Exclude page labels (explicit page numbers) from the output file.
1649 1657
@@ -2707,7 +2715,7 @@ These options are valid between :qpdf:ref:`--add-attachment` and ``--``. @@ -2707,7 +2715,7 @@ These options are valid between :qpdf:ref:`--add-attachment` and ``--``.
2707 2715
2708 .. qpdf:option:: --mimetype=type/subtype 2716 .. qpdf:option:: --mimetype=type/subtype
2709 2717
2710 - .. help: attachment mime type (e.g. application/pdf) 2718 + .. help: attachment mime type, e.g. application/pdf
2711 2719
2712 Specify the mime type for the attachment, such as text/plain, 2720 Specify the mime type for the attachment, such as text/plain,
2713 application/pdf, image/png, etc. 2721 application/pdf, image/png, etc.