Documentation and API

Here you could find some documentation about using and programming PyWebGal. Well, since I don't have too much time right now, I'll put something here in near future. If you would like to help me with it, contact me. It would also be nice to have the documentation translated, for non-english readers.

Using PyWebGal

The most basic example

The most basic example would be just to create an album from your directory on disk, with the default options. To do it, use the following command:

 /path/to/pygal/pygal <source-dir> <destination-dir>
 

Notice that the files will be saved under the destination-dir, with the index file named index.html. If the destination-dir is not be found, it will be created. The data files (.css, .png, etc) are taken from the /path/to/pygal/data directory if no --data=data-dir is specified on the command line.

Options you can set

To see the possible options you can set on the command line, use pygal --help command. The possible options and their short description will be shown.

All of the options (or, at least, most of them) you can set in the config file, if you don't want to write a long command each time.

Writing config files

The default, system-wide configuration file is located in /etc/pygal.conf. Also each user can specify his own options placing the file .pygal.conf in own home directory. Since there's no installation right now for PyWebGal, each config file have to be prepared by the user.

The options specified in the config file can be overwritten with command line arguments. But, if you use the script with some parameters often, put them into the config file.

The config file syntax is very simple. Each line not beginning with # is treated as the option set line. It should look like this: optionName = optionValue. The possible option names and example values are:

API - Programming PyWebGal plugins

I will write here something in the near future...

Valid XHTML 1.1! Valid CSS! SourceForge.net Logo