NAME
ttree - template tree processor
USAGE
ttree filename # process file(s)
ttree -a # process all files (implicit -r)
ttree -r # recurse into sub-directories
ttree -v # verbose
ttree -s dir # source directory
ttree -d dir # destination directory
ttree -l lib # template lib directory (INCLUDE_PATH)
e.g.
ttree index.html # process one file from 'src' to 'dest'
ttree -va # process all files (definitions for src, dest
# etc., read from ~/.ttreerc)
ttree -va -s /tmp/templates -d /tmp/output -l /user/abw/templates
# explicit definition of directories
DESCRIPTION
The ttree script is used to process entire directory trees containing template files. This documentation is incomplete but will be updated for the next beta release.
The script reads the .ttreerc file in the directory represented by the HOME environment variable. The TTREERC environment variable may define an alternative configuration file. Such a file might look like this:
# this is my .ttreerc file for Template Toolkit
src = /home/abw/websrc/doc
dest = /home/abw/public_html/
lib = /home/abw/websrc/lib
lib = /usr/local/templates/lib
ignore = ^CVS$
ignore = \.gif$
The 'src' directory represent a directory where the script will start looking for files. Any files named on the command line should be relative to this location. If no files are named and the -a
option is specified then all files in that and any sub-directories will be processed. The result of processing each template is output to the corresponding file in the 'dest' directory. The 'lib' option may be specified any number of times to indicate directories in which the Template Toolkit should look for other template files (INCLUDE_PATH). The ignore option can be used to specify one or more Perl regexen to match against files that shouldn't be processed.
AUTHOR
Andy Wardley <cre.canon.co.uk>
REVISION
$Revision: 1.5 $
BUGS
Amongst other things...
Lack of documentation.
Doesn't check modification times of source and destination files to only process updated files.
COPYRIGHT
Copyright (C) 1996-1999 Andy Wardley. All Rights Reserved. Copyright (C) 1998-1999 Canon Research Centre Europe Ltd.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.