At 05:58 PM 01/23/02 -0500, David B. Bitton wrote: >I have been using TT2 in code for a while now, but I've never tried TTree >before. I am confused by the documentation. How does it process a whole >file tree? What do I have to do to my templates to make then TTree ready?
Not much. You set up a .ttreerc file in $HOME. it has a line like src = /home/moseley/tt/websrc dst = /home/moseley/public_html lib = /home/moseley/tt/ttlib copy = \.(gif|png|jpg|jpeg|pdf|zip|txt|doc|pm)$ pre_process = config process = wrapper The src says where the source templates are located, and the dst is the output location. Use config to set variables for use in the templates. I use "wrapper" to create my pages which is basically: [%- WRAPPER page; PROCESS $template; END -%] Then I run ttree like ttree -r -p >Also, in the demos, the INCLUDE directives do not have a file extension, >so the say INCLUDE foo not INCLUDE foo.bar. Is there a default extension >for a template? No, I don't think so. >My objective is the create templates that would comprise >an entire site. Then symlink up an image dir (or somehow loop through a >number of them, perhaps piping the ouput of an ls to TTree via xargs), and >churn full sites from them. I just build the entire site under my websrc directory and let ttree build the templates and copy the images and other related files as needed. Works nicely for simple mostly static sites. -- Bill Moseley mailto:[EMAIL PROTECTED]
