pdx Invocation Index pdx Reference

pdx Configuration

pdx is configured in .pdrxrc together with pdr.

General options

The file .pdrxrc 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 tells pdx the encoding of the console where pdx runs, this encoding is also 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) in all inputs and outputs. 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, ASCII/CP437 and ASCII/CP850.
midnight = 2:00
defines the time to be used as "logical midnight". This option has an impact on functions of pdx, for instance on the statistic functions, and allows a value which comes after midnight still to belong to the previous day. This has been found useful in many situations. If this option is not set 0:00 is being used for "logical midnight".
period = from to color defines a time period. from and to are dates, color is a color in the well known # notation, Example:

period = 2011-01-27 2011-03-19 #EFEFEF

There could be many of such definitions in the .pdrxrc file. pdx will colorize the background of it's diagrams in the specified color if a diagram contains a time span from a defined time period. This is very helpful for visualizing holidays, travels or experimental phases.

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:
  1. 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.
  2. 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 .pdrxrc 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, report2 This line defines output identifiers for pdx. These outputs will be created as configured. You only have to specify top level outputs here. Dependent outputs, in example diagrams in a report, are better specified as dependencies during the definition of their superior output.

Configuration of a report

To configure a report you need the following settings:

report1.type          = report
report1.dependencies  = diagram1, diagram2, diagram3
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 second line names three diagrams to be dependent. This means they will also be generated. 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.


pdx Invocation Index pdx Reference