Commit cd30f626fedef7c577766d32e84a65a7f0fbcb7a

Authored by Jay Berkenbilt
1 parent eeffc69d

QPDFJob: remove from json a few things that only make sense from CLI

job.sums
@@ -6,12 +6,12 @@ include/qpdf/auto_job_c_enc.hh 72e138c7b96ed5aacdce78c1dec04b1c20d361faec4f8faf5 @@ -6,12 +6,12 @@ include/qpdf/auto_job_c_enc.hh 72e138c7b96ed5aacdce78c1dec04b1c20d361faec4f8faf5
6 include/qpdf/auto_job_c_main.hh 516adb23cc7e44e614e436880be870d0574e4ebbc706cd855a1360000eed31bb 6 include/qpdf/auto_job_c_main.hh 516adb23cc7e44e614e436880be870d0574e4ebbc706cd855a1360000eed31bb
7 include/qpdf/auto_job_c_pages.hh 931840b329a36ca0e41401190e04537b47f2867671a6643bfd8da74014202671 7 include/qpdf/auto_job_c_pages.hh 931840b329a36ca0e41401190e04537b47f2867671a6643bfd8da74014202671
8 include/qpdf/auto_job_c_uo.hh 0585b7de459fa479d9e51a45fa92de0ff6dee748efc9ec1cedd0dde6cee1ad50 8 include/qpdf/auto_job_c_uo.hh 0585b7de459fa479d9e51a45fa92de0ff6dee748efc9ec1cedd0dde6cee1ad50
9 -job.yml 6389b89c25f0f07fa54bfc3d9f24f814aac5566ace43666f81476781db616ea1 9 +job.yml 14622557f5c96f379645f01c3d21b3d03bb8fd9c6062a3af429430d5348f5538
10 libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6 10 libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6
11 libqpdf/qpdf/auto_job_help.hh 23c79f1d2c02bda28f64aace17f69487205c797e7ae2234892cbbabab49d6d47 11 libqpdf/qpdf/auto_job_help.hh 23c79f1d2c02bda28f64aace17f69487205c797e7ae2234892cbbabab49d6d47
12 libqpdf/qpdf/auto_job_init.hh 8e9e31b6099a662497339b27f6e2d7f779f35011e88a834bee8811c33405a0fe 12 libqpdf/qpdf/auto_job_init.hh 8e9e31b6099a662497339b27f6e2d7f779f35011e88a834bee8811c33405a0fe
13 libqpdf/qpdf/auto_job_json_decl.hh f349b55cf85d07a28aeb4bef257bdbcbe16f76b8065d01154161897b1e0fa643 13 libqpdf/qpdf/auto_job_json_decl.hh f349b55cf85d07a28aeb4bef257bdbcbe16f76b8065d01154161897b1e0fa643
14 -libqpdf/qpdf/auto_job_json_init.hh 9ea198c4daa6badb30690e2814f3d6ab761c09973a0712341081dabcb2097006  
15 -libqpdf/qpdf/auto_job_schema.hh 9e19fb0b8ddd6fe13da12f1f98c27f6d558fc4706a56a63697e529b3140a457c 14 +libqpdf/qpdf/auto_job_json_init.hh 60d08982781bd568ab6083d325441f99a6bc39f72492558b8a64757373b2cfbe
  15 +libqpdf/qpdf/auto_job_schema.hh a483911bb1fda9cca53f3021bcdf26998604eabb23f131c78055c52d33ff5a4f
16 manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3 16 manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3
17 manual/cli.rst 79140e023faa0cb77afe0b1dc512dd120ee5617f4db82f842596e4f239f93882 17 manual/cli.rst 79140e023faa0cb77afe0b1dc512dd120ee5617f4db82f842596e4f239f93882
@@ -244,6 +244,9 @@ no-json: @@ -244,6 +244,9 @@ no-json:
244 - job-json-file 244 - job-json-file
245 - empty 245 - empty
246 - replace-input 246 - replace-input
  247 + - warning-exit-0
  248 + - requires-password
  249 + - is-encrypted
247 json: 250 json:
248 # The structure of this section defines what the json input to 251 # The structure of this section defines what the json input to
249 # QPDFJob looks like. If a key starts with underscore or has a value 252 # QPDFJob looks like. If a key starts with underscore or has a value
@@ -322,9 +325,7 @@ json: @@ -322,9 +325,7 @@ json:
322 check: 325 check:
323 check-linearization: 326 check-linearization:
324 filtered-stream-data: 327 filtered-stream-data:
325 - is-encrypted:  
326 raw-stream-data: 328 raw-stream-data:
327 - requires-password:  
328 show-encryption: 329 show-encryption:
329 show-encryption-key: 330 show-encryption-key:
330 show-linearization: 331 show-linearization:
@@ -347,7 +348,6 @@ json: @@ -347,7 +348,6 @@ json:
347 keep-files-open-threshold: 348 keep-files-open-threshold:
348 no-warn: 349 no-warn:
349 verbose: 350 verbose:
350 - warning-exit-0:  
351 ignore-xref-streams: 351 ignore-xref-streams:
352 password-is-hex-key: 352 password-is-hex-key:
353 password-mode: 353 password-mode:
libqpdf/qpdf/auto_job_json_init.hh
@@ -87,9 +87,7 @@ beginDict("inspect", bindJSON(&Handlers::beginInspect), bindBare(&Handlers::endI @@ -87,9 +87,7 @@ beginDict("inspect", bindJSON(&Handlers::beginInspect), bindBare(&Handlers::endI
87 addBare("check", [this]() { c_main->check(); }); 87 addBare("check", [this]() { c_main->check(); });
88 addBare("checkLinearization", [this]() { c_main->checkLinearization(); }); 88 addBare("checkLinearization", [this]() { c_main->checkLinearization(); });
89 addBare("filteredStreamData", [this]() { c_main->filteredStreamData(); }); 89 addBare("filteredStreamData", [this]() { c_main->filteredStreamData(); });
90 -addBare("isEncrypted", [this]() { c_main->isEncrypted(); });  
91 addBare("rawStreamData", [this]() { c_main->rawStreamData(); }); 90 addBare("rawStreamData", [this]() { c_main->rawStreamData(); });
92 -addBare("requiresPassword", [this]() { c_main->requiresPassword(); });  
93 addBare("showEncryption", [this]() { c_main->showEncryption(); }); 91 addBare("showEncryption", [this]() { c_main->showEncryption(); });
94 addBare("showEncryptionKey", [this]() { c_main->showEncryptionKey(); }); 92 addBare("showEncryptionKey", [this]() { c_main->showEncryptionKey(); });
95 addBare("showLinearization", [this]() { c_main->showLinearization(); }); 93 addBare("showLinearization", [this]() { c_main->showLinearization(); });
@@ -111,7 +109,6 @@ addChoices("keepFilesOpen", yn_choices, [this](char const* p) { c_main->keepFile @@ -111,7 +109,6 @@ addChoices("keepFilesOpen", yn_choices, [this](char const* p) { c_main->keepFile
111 addParameter("keepFilesOpenThreshold", [this](char const* p) { c_main->keepFilesOpenThreshold(p); }); 109 addParameter("keepFilesOpenThreshold", [this](char const* p) { c_main->keepFilesOpenThreshold(p); });
112 addBare("noWarn", [this]() { c_main->noWarn(); }); 110 addBare("noWarn", [this]() { c_main->noWarn(); });
113 addBare("verbose", [this]() { c_main->verbose(); }); 111 addBare("verbose", [this]() { c_main->verbose(); });
114 -addBare("warningExit0", [this]() { c_main->warningExit0(); });  
115 addBare("ignoreXrefStreams", [this]() { c_main->ignoreXrefStreams(); }); 112 addBare("ignoreXrefStreams", [this]() { c_main->ignoreXrefStreams(); });
116 addBare("passwordIsHexKey", [this]() { c_main->passwordIsHexKey(); }); 113 addBare("passwordIsHexKey", [this]() { c_main->passwordIsHexKey(); });
117 addChoices("passwordMode", password_mode_choices, [this](char const* p) { c_main->passwordMode(p); }); 114 addChoices("passwordMode", password_mode_choices, [this](char const* p) { c_main->passwordMode(p); });
libqpdf/qpdf/auto_job_schema.hh
@@ -72,9 +72,7 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({ @@ -72,9 +72,7 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
72 "check": "partially check whether PDF is valid", 72 "check": "partially check whether PDF is valid",
73 "checkLinearization": "check linearization tables", 73 "checkLinearization": "check linearization tables",
74 "filteredStreamData": "show filtered stream data", 74 "filteredStreamData": "show filtered stream data",
75 - "isEncrypted": "silently test whether a file is encrypted",  
76 "rawStreamData": "show raw stream data", 75 "rawStreamData": "show raw stream data",
77 - "requiresPassword": "silently test a file's password",  
78 "showEncryption": "information about encrypted files", 76 "showEncryption": "information about encrypted files",
79 "showEncryptionKey": "show key with showEncryption", 77 "showEncryptionKey": "show key with showEncryption",
80 "showLinearization": "show linearization hint tables", 78 "showLinearization": "show linearization hint tables",
@@ -100,7 +98,6 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({ @@ -100,7 +98,6 @@ static constexpr char const* JOB_SCHEMA_DATA = R"({
100 "keepFilesOpenThreshold": "set threshold for keepFilesOpen", 98 "keepFilesOpenThreshold": "set threshold for keepFilesOpen",
101 "noWarn": "suppress printing of warning messages", 99 "noWarn": "suppress printing of warning messages",
102 "verbose": "print additional information", 100 "verbose": "print additional information",
103 - "warningExit0": "exit 0 even with warnings",  
104 "ignoreXrefStreams": "use xref tables rather than streams", 101 "ignoreXrefStreams": "use xref tables rather than streams",
105 "passwordIsHexKey": "provide hex-encoded encryption key", 102 "passwordIsHexKey": "provide hex-encoded encryption key",
106 "passwordMode": "tweak how qpdf encodes passwords", 103 "passwordMode": "tweak how qpdf encodes passwords",