Information for Linux Distribution packagers

The source code is at :
http://launchpad.net/vatstuff

The program consists of:

There are no c extensions. VATStuff depends on:

vatstuff_packages:

Contains all pure-python packages and needs to be either on the python path, or under the same directory as vatstuff.py

vatstuff_files:

Contains data files and directories needed by the program. The directories are described below, but you will also find three files directly under vatstuff_files, these are:

vatstuff.cfg    the configuration file
vatstuff.cfg.install    a version of the config file copied onto vatstuff.cfg when 'python setup.py install' is run.
vatstuff.cfg.local    a copy of the original configuration file.

Of the above three, only vatstuff.cfg is needed (suitably edited), and should be placed somewhere vatstuff.py can find it.
Within the executable script vatstuff.py there is the line:
_CONFIG_LOCATION = None

With this value set to None, vatstuff.py looks for vatstuff.cfg in a number of standard locations.
If you locate configuration files somewhere special, or just for efficiency, then edit the variable to point to the filepath of vatstuff.cfg, for example:
_CONFIG_LOCATION = "/etc/vatstuff/vatstuff.cfg"

So when run, vatstuff.py knows the location of vatstuff.cfg, and can read its configuration parameters.

Within vatstuff.cfg, the locations of the directories under vatstuff_files are specified. So you can place vatstuff_files anywhere, and edit vatstuff.cfg to show their location. The three lines you are likely to edit are:

images_folder =
html_folder =
log_folder =

Set these to the location of the data directories:

vatstuff_files/images    contains image files used by vatstuff
vatstuff_files/html    contains html files used by vatstuff
vatstuff_files/log    a directory for log files

There also exists:

vatstuff_files/license    copies of the gpl, not read by vatstuf

The html and images directories are only read, never written by vatstuff.
The license directory is not used by vatstuff at all.

The log directory needs to be writeable, and normally you would want it elsewhere (perhaps under /var/log/vatstuff), in which case the line in vatstuff.cfg should be suitably edited, for example:
log_folder = /var/log/vatstuff

vatstuff itself rotates the logs it creates in this directory, so there is no need for any other log rotation mechanism.

You should also know that, when started, vatstuff creates a directory:
.vatstuff

under the users home directory; this contains a file holding user preferences (such as the location of the users last database). This directory could also be used to hold the log files, in which case the line in the vatstuff.cfg file would be:
log_folder = %HOME%/.vatstuff

VATStuff substitutes the users home directory for %HOME% when it reads the config file.