Specifier configuration explained

This commit is contained in:
Bela 2018-07-16 11:38:55 +02:00
parent b9084b7493
commit 21dc986e98

View file

@ -32,13 +32,21 @@ Some keys can appear more than once. Those are (see constants.MobileRegex):
Data
The order of the infos do not matter and can change by reading and writing.
Nonfields
---------
For several cases it is necessary to create fields that do not correspond to
any form field in the pdf. Those are marked by the info "Nonfield"
(see constants.NON_FORMFIELD) that must appear to tell the program that
this field is not to be written to a pdf. The value of this info is irrelevant.
One use case are fields that have questions that can be used several
times and are therefore outside any specific form field. Other use case are listed below:
Mainconfig
----------
There can be one special field. It does not correspond to any field in the pdf form.
It is identified by the FieldName "Mainconfig" (see constants.CONFIGFIELD) and the
info "Nonfield" (see constants.NON_FORMFIELD) that must appear to tell the program
that this field is not to written to a pdf.
In this 'field' configuration that does not belong to any form field is placed.
info "Nonfield" (see constants.NON_FORMFIELD).
In this 'field' some configuration that does not belong to any form field is placed.
So far this is only data file paths.
In variables (see below) one can reference to other form files to get data. In
the variables one only uses a "specifier". In the mainconfig it is saved which file
@ -47,9 +55,39 @@ this corresponds to in the following way:
Data: f
f-Path: otherFile.form
or
Data: f
f-Path: directory
where f is the specifier used in variables.
These specifier - file mapping can be overwritten by the command-line argument --data.
In both cases (file or directory) it is taken to be relative to the form file itself.
When a directory is specified, the programm searches in this directory and
all subdirectories for a form file that fits to the specifier. (see section "Specifier"
below.)
Specifier
---------
As noted in "Mainconfig" data files can be searched for and are found if
they say "I am a suitable file for this data." This is done via a field with the
FieldName Specifier (see constants.SPECIFIERFIELD) which value must be
the same as the specifier written in the config file that corresponds to the
pdf worked on.
Since the empty (not yet used) form files should not be found,
this value should not be set there but be filled via an action (usually Default).
Hence a typical field that fits to the mainconfig used as an example above looks like
FieldName: Specifier
Nonfield: True
Default: d
d-Value: f
Since FieldName should be unique one only should have one specifier but
that should not be a restriction.
Output file names
-----------------
The name of the output files can be configured with the 'fields' with the FieldName
Outputconfig (see constants.OUTPUTFIELD) and Formoutputconfig (see constants.FORMOUTPUTFIELD).
When the pdf and form file are created, the names of the new files are taken from the