2
1
mirror of https://github.com/qpdf/qpdf.git synced 2025-01-02 22:50:20 +00:00

QPDFJob: generate json decl and init file skeletons

This commit is contained in:
Jay Berkenbilt 2022-01-29 09:08:45 -05:00
parent 8a9100f674
commit 0f05cae66a
5 changed files with 27 additions and 3 deletions

View File

@ -44,6 +44,8 @@ class Main:
'init': 'libqpdf/qpdf/auto_job_init.hh',
'help': 'libqpdf/qpdf/auto_job_help.hh',
'schema': 'libqpdf/qpdf/auto_job_schema.hh',
'json_decl': 'libqpdf/qpdf/auto_job_json_decl.hh',
'json_init': 'libqpdf/qpdf/auto_job_json_init.hh',
# Others are added in top
}
SUMS = 'job.sums'
@ -284,6 +286,14 @@ class Main:
print(BANNER, file=f)
for i in v:
print(i, file=f)
with write_file(self.DESTS['json_decl']) as f:
print(BANNER, file=f)
for i in self.json_decls:
print(i, file=f)
with write_file(self.DESTS['json_init']) as f:
print(BANNER, file=f)
for i in self.json_init:
print(i, file=f)
# Update hashes last to ensure that this will be rerun in the
# event of a failure.
@ -351,6 +361,8 @@ class Main:
def prepare(self, data):
self.decls = []
self.init = []
self.json_decls = []
self.json_init = []
self.jdata = {}
def add_jdata(flag, table):

View File

@ -1,5 +1,5 @@
# Generated by generate_auto_job
generate_auto_job 27d219c995864896b1c4a42f303bc3bebb198d9b90d275b727645013c8f6a33e
generate_auto_job f9aa6ddc529f5be910566a59329d1d2fea7d18c7e5c014fe30f6567a3bd518aa
include/qpdf/auto_job_c_att.hh 7ad43bb374c1370ef32ebdcdcb7b73a61d281f7f4e3f12755585872ab30fb60e
include/qpdf/auto_job_c_copy_att.hh 32275d03cdc69b703dd7e02ba0bbe15756e714e9ad185484773a6178dc09e1ee
include/qpdf/auto_job_c_enc.hh 72e138c7b96ed5aacdce78c1dec04b1c20d361faec4f8faf52f64c1d6be99265
@ -10,6 +10,8 @@ job.yml 1590fd16fd17ed40db9aa56b6713c844cfd61b3a6d0441a3ccd122b7371c68e9
libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6
libqpdf/qpdf/auto_job_help.hh 23c79f1d2c02bda28f64aace17f69487205c797e7ae2234892cbbabab49d6d47
libqpdf/qpdf/auto_job_init.hh 3b6323189480a7d782563c9d2b5bc29b8dcd19c6dcc89840b207e38cb503d3f1
libqpdf/qpdf/auto_job_json_decl.hh 931840b329a36ca0e41401190e04537b47f2867671a6643bfd8da74014202671
libqpdf/qpdf/auto_job_json_init.hh 931840b329a36ca0e41401190e04537b47f2867671a6643bfd8da74014202671
libqpdf/qpdf/auto_job_schema.hh 1c3b4b5488270f8d200ed345573e3a241f15baff6fb7e97ec3d044103b2546d9
manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3
manual/cli.rst 79140e023faa0cb77afe0b1dc512dd120ee5617f4db82f842596e4f239f93882

View File

@ -16,7 +16,7 @@ namespace
void handle(JSON&);
private:
//# include <qpdf/auto_job_json_decl.hh>
# include <qpdf/auto_job_json_decl.hh>
void usage(std::string const& message);
void initHandlers();
@ -40,7 +40,7 @@ Handlers::Handlers(std::shared_ptr<QPDFJob::Config> c_main) :
void
Handlers::initHandlers()
{
//# include <qpdf/auto_job_json_init.hh>
# include <qpdf/auto_job_json_init.hh>
jh.addDictHandlers(
[](std::string const&){},
[this](std::string const&){c_main->checkConfiguration();});

View File

@ -0,0 +1,5 @@
//
// This file is automatically generated by generate_auto_job.
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//

View File

@ -0,0 +1,5 @@
//
// This file is automatically generated by generate_auto_job.
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//