Template::Tools::ttree 2.19
Sponsored Links
Template::Tools::ttree 2.19 Ranking & Summary
File size:
0.75 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
813
Date added:
2007-08-06
Publisher:
Andy Wardley
Template::Tools::ttree 2.19 description
Template::Tools::ttree module can process entire directory trees of templates.
SYNOPSIS
ttree [options] [files]
The ttree script is used to process entire directory trees containing template files. The resulting output from processing each file is then written to a corresponding file in a destination directory. The script compares the modification 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 configure behaviour, define locations and set Template Toolkit options. The script first reads the .ttreerc configuration 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.
The .ttreerc Configuration File
When you run ttree for the first time it will ask you if you want it to create a .ttreerc file for you. This will be created in your home directory.
$ ttree
Do you want me to create a sample .ttreerc file for you?
(file: /home/abw/.ttreerc) [y/n]: y
/home/abw/.ttreerc created. Please edit accordingly and re-run ttree
The purpose of this file is to set any global configuration options that you want applied every time ttree is run. For example, you can use the ignore and copy option to provide regular expressions that specify which files should be ignored and which should be copied rather than being processed as templates. You may also want to set flags like verbose and recurse according to your preference.
A minimal .ttreerc:
# ignore these files
ignore = b(CVS|RCS)b
ignore = ^#
ignore = ~$
# copy these files
copy = .(gif|png|jpg|pdf)$
# recurse into directories
recurse
# provide info about whats going on
verbose
In most cases, youll want to create a different ttree configuration file for each project youre working on. The cfg option allows you to specify a directory where ttree can find further configuration files.
cfg = /home/abw/.ttree
The -f command line option can be used to specify which configuration file should be used. You can specify a filename using an absolute or relative path:
$ ttree -f /home/abw/web/example/etc/ttree.cfg
$ ttree -f ./etc/ttree.cfg
$ ttree -f ../etc/ttree.cfg
If the configuration file does not begin with / or . or something that looks like a MS-DOS absolute path (e.g. C:etcttree.cfg) then ttree will look for it in the directory specified by the cfg option.
$ ttree -f test1 # /home/abw/.ttree/test1
The cfg option can only be used in the .ttreerc file. All the other options can be used in the .ttreerc or any other ttree configuration file. They can all also be specified as command line options.
Remember that .ttreerc is always processed before any configuration file specified with the -f option. Certain options like lib can be used any number of times and accumulate their values.
For example, consider the following configuration files:
/home/abw/.ttreerc:
cfg = /home/abw/.ttree
lib = /usr/local/tt2/templates
/home/abw/.ttree/myconfig:
lib = /home/abw/web/example/templates/lib
When ttree is invoked as follows:
$ ttree -f myconfig
the lib option will be set to the following directories:
/usr/local/tt2/templates
/home/abw/web/example/templates/lib
Any templates located under /usr/local/tt2/templates will be used in preference to those located under /home/abw/web/example/templates/lib. This may be what you want, but then again, it might not. For this reason, it is good practice to keep the .ttreerc as simple as possible and use different configuration files for each ttree project.
SYNOPSIS
ttree [options] [files]
The ttree script is used to process entire directory trees containing template files. The resulting output from processing each file is then written to a corresponding file in a destination directory. The script compares the modification 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 configure behaviour, define locations and set Template Toolkit options. The script first reads the .ttreerc configuration 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.
The .ttreerc Configuration File
When you run ttree for the first time it will ask you if you want it to create a .ttreerc file for you. This will be created in your home directory.
$ ttree
Do you want me to create a sample .ttreerc file for you?
(file: /home/abw/.ttreerc) [y/n]: y
/home/abw/.ttreerc created. Please edit accordingly and re-run ttree
The purpose of this file is to set any global configuration options that you want applied every time ttree is run. For example, you can use the ignore and copy option to provide regular expressions that specify which files should be ignored and which should be copied rather than being processed as templates. You may also want to set flags like verbose and recurse according to your preference.
A minimal .ttreerc:
# ignore these files
ignore = b(CVS|RCS)b
ignore = ^#
ignore = ~$
# copy these files
copy = .(gif|png|jpg|pdf)$
# recurse into directories
recurse
# provide info about whats going on
verbose
In most cases, youll want to create a different ttree configuration file for each project youre working on. The cfg option allows you to specify a directory where ttree can find further configuration files.
cfg = /home/abw/.ttree
The -f command line option can be used to specify which configuration file should be used. You can specify a filename using an absolute or relative path:
$ ttree -f /home/abw/web/example/etc/ttree.cfg
$ ttree -f ./etc/ttree.cfg
$ ttree -f ../etc/ttree.cfg
If the configuration file does not begin with / or . or something that looks like a MS-DOS absolute path (e.g. C:etcttree.cfg) then ttree will look for it in the directory specified by the cfg option.
$ ttree -f test1 # /home/abw/.ttree/test1
The cfg option can only be used in the .ttreerc file. All the other options can be used in the .ttreerc or any other ttree configuration file. They can all also be specified as command line options.
Remember that .ttreerc is always processed before any configuration file specified with the -f option. Certain options like lib can be used any number of times and accumulate their values.
For example, consider the following configuration files:
/home/abw/.ttreerc:
cfg = /home/abw/.ttree
lib = /usr/local/tt2/templates
/home/abw/.ttree/myconfig:
lib = /home/abw/web/example/templates/lib
When ttree is invoked as follows:
$ ttree -f myconfig
the lib option will be set to the following directories:
/usr/local/tt2/templates
/home/abw/web/example/templates/lib
Any templates located under /usr/local/tt2/templates will be used in preference to those located under /home/abw/web/example/templates/lib. This may be what you want, but then again, it might not. For this reason, it is good practice to keep the .ttreerc as simple as possible and use different configuration files for each ttree project.
Template::Tools::ttree 2.19 Screenshot
Advertisements
Template::Tools::ttree 2.19 Keywords
can be used
be used
Configuration file
entire directory
directory trees
can be
ttree
file
configuration
files
directory
used
Template::Tools::ttree
TemplateToolsttree
Template::Tools::ttree 2.19
Libraries
Bookmark Template::Tools::ttree 2.19
Template::Tools::ttree 2.19 Copyright
WareSeeker periodically updates pricing and software information of Template::Tools::ttree 2.19 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Template::Tools::ttree 2.19 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
wav files
filesharing
web.config configuration file
rar files
midi files
pdf files
file sharing
zip files
apache configuration file
configuration file php.ini path
ways excel can be used in business
used to
web configuration file
can be used to heat large amounts of liquid
what can block grants be used for
configuration files
the configuration file now needs a secret passphrase blowfish secret
the cfg pmaabsoluteuri directive must be set in your configuration file
Related Software
Template::Plugins is a Perl module with plugin provider module. Free Download
SMS Server Tools package contains applications to send and receive short messages through GSM modems or mobile phones. Free Download
Mars Simulation Project is a simulation of a human settlement on Mars. Free Download
Simple Config library supports configuration files consisting of simple name-value pairs, similar to the old Windows INI files. Free Download
HTB-tools Bandwidth Management Software is a suite of tools that help simplify the difficult process of bandwidth allocation. Free Download
xml2hostconf is a generator of RPM, kickstart, dhcpd, and pxelinux configuration from XML. Free Download
Makejail employs short configuration files to help administrators create and maintain chroot jails. Free Download
rconftool is an implementation of sysconftool in Ruby. Free Download
Latest Software
Popular Software
Favourite Software