Jay Berkenbilt
b9cd693a5b
QPDFJob: allocate QPDFArgParser on stack
...
The previous commits have removed all references to memory from
QPDFArgParser from QPDFJob. This commit removes the constraint that
QPDFArgParser remain in scope. This is a prerequisite to allowing JSON
as an alternative way to initialize QPDFJob and to initialize it
directly using a public API.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
d526d4c17f
QPDFJob: convert Under/Overlay to use shared pointers
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
88891a75a2
QPDFJob: convert Under/Overlay ranges to strings
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e48bfce930
QPDFJob: convert PageSpec to used shared pointer
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e4905983d2
QPDFJob: convert outfilename to shared pointer
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e5edfc786f
QPDFJob: convert infilename to shared pointer
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
ee7824cf28
QPDFJob: convert encryption_file args to shared pointers
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
021db6f226
QPDFJob: convert password to shared pointer
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
1a8c2eb93b
QPDFJob: use std::shared_ptr over PointerHolder where possible
...
Also fix QPDFArgParser
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
76c4f78b5c
Add QUtil::make_shared_cstr
...
Replace most of the calls to QUtil::copy_string with this instead.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
67f9d0b7d5
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.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
8dea480c9f
Allow optional fields in json "schema" checks
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
558ba2823e
TODO note about debian package and docs
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
ec85e56c3f
Add missing help topic for inspection
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
09e3b86fe4
Refactor generate_auto_job to prepare for json
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
a218ed488d
TODO notes
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
1db0a7ffce
JSONHandler: rework dictionary and array handlers
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
acf8d18b6e
Editorial changes to cli.rst
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
cf8405d91e
Fix json schema for objects to include dictionary key
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
2e58541493
Use JSON::parse to initialize schema for json mode
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
37105710ee
Implement JSONHandler for recursively processing JSON
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
a6df6fdaf7
CLI doc: use tables where helpful
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c529c28df6
Manual: use proper character for >=
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
211f1fdfe1
Allow real <= and >= in LateX
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
195ddf6f5a
Manual: convert more lists to tables
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
3d2d75cfa4
TODO reminder about table wrapping patch
2022-01-30 13:11:03 -05:00
m-holger
ee632237f4
Manual: reformat P information as table
2022-01-30 13:11:03 -05:00
m-holger
1efcda1657
Manual: enable line wrapping in table cells
2022-01-30 13:11:03 -05:00
m-holger
f2a3b9cbfc
Fix manual typo
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
e8e8f6f43c
Add JSON::parse
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
b9af421ef7
Add missing \f support for JSON string encoder
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
aa0a379b37
Add JSON::isDictionary and JSON::isArray
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
5c5e5ca29b
Document how to add a command-line argument
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c8729398dd
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.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
b4bd124be4
QPDFArgParser: support adding/printing help information
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
5303130cf9
Fix comment on duplicated top-level json keys
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
53ba65eb59
QPDFArgParser: handle optional choices including help
...
Handle optional choices in addition to required choices. Refactor the
way help options are added to completion to make it work with optional
help choices.
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
a301cc5373
Minor code cleanup
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
3ab25d595b
Fix doc typos caught by m-holger -- thanks
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
4577df4b5d
QPDFJob increment: generate option table initialization
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
f1d805badc
Add QPDFArgParser::copyFromOtherTable
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c3e9b64e7f
QPDFJob increment: generate handler declarations
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
6e70d99b58
QPDFJob increment: generate choices variables in init
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
cb684ec4d3
QPDFJob increment: generate table names
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
fc14bfbbe7
Create real job.yml
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
f8eee83515
Expose QPDFArgParser::usage
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
8dcf6da259
QPDFJob: remove non-check from doFinalChecks
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
c216854607
Add basic framework for QPDFJob code generation
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
ad096b462c
Add place-holder job.yml
2022-01-30 13:11:03 -05:00
Jay Berkenbilt
bd89aac360
QPDFJob increment: move arg parsing into QPDFJob
...
Move ArgParser from qpdf.cc into QPDFJob.cc. It still works with
millions of public member variables, but now qpdf.cc is minimal and
just calls stable library functions.
2022-01-30 13:11:03 -05:00