next up previous contents
Next: Requirements Up: SnapSource: Automatic Snapshots of Previous: Installation and Running


Configuration File

In order to create the snapshots, SnapSource has to be informed where to check the source codes and where to store the base and delta files. A configuration file is read from the .snapsource directory in your home directory. Lines beginning with a double slash sign (//) in the configuration file are considered as comment lines and will be ignored by snapsource. WARNING: Starting in release 0.11, the old comment delimiter (`#') was obsoleted, because the pound sign was used by Tk to represent color names.

In general, a SnapSource configuration file is line-oriented and each line consists of a parameter name and its value delimited by an equal sign. All configuration entries have to be written not to exceed a single line.


To perform automatic and periodic capture of source code, SnapSource must be triggered by some external event. The INTERVAL parameter specifies how often the external event should be generated. The value specified is given in minutes.

Source and Target Directory

In the configuration file, SOURCE_DIRECTORY specifies the top-level directory where the source code of the project is stored. This directory will be recursively checked by SnapSource. The TARGET_DIRECTORY specifies the directory to store the base and delta files. Under this target directory, SnapSource will create two subdirectories: base (for storing the base files) and delta (for storing the delta files).

The structure of SOURCE_DIRECTORY will be mimicked in the target directory as TARGET_DIRECTORY/base and TARGET_DIRECTORY/delta. Files in the delta directory will have a suffix

where YYYY is the year, MM is the month (01-12), DD is the day (01-31), hh is the hour (01-23), mm is the minute (00-59), and ss is the second (00-59) when the difference was created.

File Inclusion or Exclusion

With thousands of programming language out there in the software world, SnapSource has to anticipate the possibility that the source codes it has to take care of can be written in anyone of these languages. Therefore, users are given choice to selectively include or exclude file names by some patterns. The parameters INCLUDE_PATTERNS and EXCLUDE_PATTERNS are provided for this purpose. Patterns can be given as if they were shell wild cards.

Starting in Revision 0.15, SnapSource offers an option for excluding directory names as well. This behavior is controlled by the parameter EXCLUDE_DIRS. Any directories whose name matches any of the patterns specified in this option will be excluded from the search by snapsource. This also implies that all the files and lower subdirectories under those directories will be excluded.


To facilitate easy visual location of changes in the source code, SnapSource displays them in different colors. To accommodate different window manager themes and color settings, user preferred colors can be specified in the configuration file.

The parameters ADD_COLOR, CHANGE_COLOR, and DELETE_COLOR can be set to any color names in the X windows color name data base or a color constant prefixed with a pound sign (`#') as used by Tk_Color.


SnapSource is designed to incorporate extensive user customization preferences. There are a number of different spots in which user preferences can be incorporated in to the SnapSource utility: compression method for creating base files, diff command options for creating delta files, delta file suffix format, etc.

In this release of SnapSource, the parameter DIFF_OPTION can be used to specify how delta files are to be generated.

Running crontab

Starting release 0.10, a new option for specifying location of the crontab program is available. If this variable is undefined, CRONTAB will be set to /usr/bin/crontab.

next up previous contents
Next: Requirements Up: SnapSource: Automatic Snapshots of Previous: Installation and Running
Hans Dulimarta