pdx Configuration
pdx is configured in .pdrx
together with pdr. This file is normally located in the user's HOME
directory. But if there's a file of this name in the actual directory
this file is being used.
General options
The file .pdrx can
contain the following general options:
verbose
=
true |
produce readable
messages to see
what's going on, otherwise both programs will show only error messages
|
interactive
=
true
|
start pdx always in
interactive mode, not recommended
|
encoding
=
UTF-8 |
sets the default encoding which
is used if we don't have any better
specification. This option is responsible for handling text correctly
(for instance comments, especially text with german umlauts). On a
modern system you will use UTF-8 or ISO-8859-1, depending on what your
shell is using. pdx allows ASCII,
UTF-8, UTF-16, ISO-8859-1, ISO-8859-15, Windows1252.
|
Database options
Here we define everything related to the database.
SQLite
database.type
=
sqlite
database.connect =
~/local/share/my_data.db
The first line defines the database to be a SQLite database. The second
line contains the complete connection string to the database. In the
case of SQLite this is just the name of the database file. Because of
the applications are personal applications the database is intended to
be placed somewhere in the users home directory. The physical creation
of the database is not a task of pdr or
pdx.
MySQL
database.type
=
mysql
database.connect
=
user=my_db_user_name;password=my_db_user_password;db=my_db_name;compress=true;auto-reconnect=true
The first line defines the database to be a MySQL database. The second
line contains the complete connection string to the database containing
key-value-pairs (the keys are bold). There are two preconditions:
- The database must exist, this means it has to be created by a
database administrator. He also gives it a name which is unique at the
database server, in example pdrx.
On
servers
used
by
several
users
it
would
be
wise
to
create
several
user
specific
databases
distinctable
by
name.
- The user (a user of the database server, not of the operating
system) must exist and must have the right to create, delete, select
and manipulate tables.
Specific options
The file .pdrx can
contain the following pdx specific settings:
fast = true
|
run pdx in fast
mode, in this
mode numeric results are stored for later calculations
|
outputs
= report1, diagram1,
diagram2, diagram3 |
This line defines output
identifiers
for pdx,
namely for a report and three diagrams, and the order in which
they are created. |
Configuration of a report
To configure a report you need the following settings:
report1.type
=
report
report1.comment_begin
=
"<!---"
report1.comment_end =
"--->"
report1.input_file
=
input/report1.html
report1.output_file =
output/report1.html
report1.encoding
=
ISO-8859-1
The first line defines report1
to be generated report. The next two lines declare the comment
indications used by pdx to identify
code blocks
with function calls in the report template. The
fourth and fifth lines name input and output file. The last line
names the encoding of the created file, only needed for files that
don't
have an encoding specification inside.
Configuration
of a diagram
The configuration of a diagram is similar to the configuration of a
report but simpler:
diagram1.type
=
diagram
diagram1.input_file
=
input/diagram1.tmpl
diagram1.output_file =
output/diagram1.png
diagram1.antialias =
true
We don't have to specify comment indications.
The
last
option
antialias
is only valid for png-files.
If
this
option
is
used
the
Cairo
library
creates
antialiased
images
which
normally
look
much
better
if
you
have zigzag lines.