ttree (1)
Name
Template::Tools::ttree - Process entire directory trees of templates
Synopsis
ttree [options] [files]
Description
The ttree script is used to process entire directory trees containing template files. The resulting output from pro cessing each file is then written to a corresponding file in a destination directory. The script compares the modi fication times of source and destination files (where they already exist) and processes only those files that have been modified. In other words, it is the equivalent of ‘make’ for the Template Toolkit.
It supports a number of options which can be used to con figure behaviour, define locations and set Template Toolkit options. The script first reads the .ttreerc con figuration file in the HOME directory, or an alternative file specified in the TTREERC environment variable. Then, it processes any command line arguments, including any additional configuration files specified via the -f (file) option.
A typical .ttreerc file might look like this:
- src
- = /home/abw/websrc/doc
- dest
- = /Chome/abw/public_html
- lib
- = /Vhome/abw/websrc/lib
- lib
- = /Susr/local/templates/lib
- cfg
- = /|home/abw/.ttree ignore = R
- copy
- = C.(gif|png)$ accept = S.[ah]tml$ ) The src option indicates a directory containing the tem plate files to be processed. A list of files may be spec ified on the command line and each will be processed in turn, writing the generated output to a corresponding file in the dest directory. If no files are explicitly named then all files in the src directory will be processed. The -r (recurse) option will also cause sub-directories to be searched for files. A source file is only processed if it has a later modification time than any corresponding destination file. Files will always be processed, regard less of modification times, if they are named explicitly on the command line, or the -a (all) option is used.
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) that it may need to INCLUDE or PROCESS, but don’t represent complete documents that should be processed in their own right (e.g. headers, footers, menu). The cfg directory speci fies the location of additional configuration files that may be loaded via the -f option.
The ignore, copy and accept options are used to specify
Perl regexen to filter file names. Files that match any
of the ignore options will not be processed. Remaining
files that match any of the copy regexen will be copied to
the destination directory. Remaining files that then
match any of the accept criteria are then processed via
the Template Toolkit. If no accept parameter is specified
then all files will be accepted for processing if not
already copied or
ignored.
Additional options may be used to set Template Toolkit parameters. For example:
interpolate
post_chomp
pre_process = header
post_process = footer
- perl5lib
- = /home/abw/lib/perl5
See ttree --help for a summary of options.
Author
Andy Wardley <abw@andywardley.com>
<http://www.andywardley.com/|http://www.andywardley.com/>
Version
2.54, distributed as part of the Template Toolkit version 2.08, released on 30 July 2002.
Copyright
Copyright (C) 1996-2002 Andy Wardley. All Rights Reserved.
Copyright (C) 1998-2002 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.
See Also
tpage
perl v5.8.0 2002-07-30 TTREE(1)
Losowe
- htsearch (1)
- std::add_pointer (3cxx)
- onak (1)
- __gnu_cxx::__mt_alloc (3cxx)
- Perl::Critic::Policy::ValuesAndExpres... (3pm)
- xrootd (1)
- Template::Plugin::GD::Graph::points (3pm)
- usb_fill_control_urb (9)
- smiGetFirstType (3)
- splashy-theme.xml (5)
- CGI::FormBuilder::Field::static (3pm)
- eX_publish.h (3)
- ldns_rr_set_owner (3)
- XML::LibXML::CDATASection (3pm)
- YGetNextEvent (3)
- GlBox.h (3)
- wxSlider (3erl)
- FcStrListDone (3)
- pointer-capture-applet (1)
- snpp (1p)













