Quoting Sean McAfee ([email protected]):
> On Tue, Apr 7, 2009 at 6:12 AM, Lyle Brooks <[email protected]> wrote:
> 
> > Sometimes I'd like to give ttree a directory as an argument and have
> > it recusively process all files in that directory tree.  It seems as if
> > currently you can either have it process everything via the -a option, or
> > ask it to process a single template....but nothing in between.
> >
> > So I am passing along this patch to ttree to allow it to take a directory
> > as an argument and "do the right thing".
> >
> 
> Seems to me that that could be dangerous.  A typo might cause many files to
> be processed.

I agree it "could" be dangerous if used incorrectly, but it also can be
quite powerful.

In my use case, I have a group of 12-15 people that are collaborating
on a project.  We've partitioned our template src tree to give each
user a subtree to a user.  This recursive option allows us to only 
process selected subtrees.


> 
> 
> > If there's already a way to do this, please disregard.
> >
> 
> I don't use ttree much myself, but could you just use the xargs command?
> 
> find $dirs -name '*.tt' -print0 | xargs -0 ttree
> 

Yes, a find/xargs combo would be another approach.  Unfortunately, our
deployment is on a Win32 platform which does not have these tools
installed, and installing a Cygwin (or comprable tool suite) would 
introduce another dependency to maintain.  So the recursive option
helps in this regard.


> 
> --Sean

> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to