Johan Vromans wrote:
> On Jul 27, 2007, at 6:30 AM, Johan Vromans wrote:
> 
>> tttee has the capability of copying files. That's nice, but with large
>> files (think MP3, AVI, FLV, ...) it's rather disk consuming to
>> maintain multiple, identical copies of the big files.
>>
>> So I've added a 'link' capability. It is similar to 'copy', but links
>> instead. Should the link fail, copy is used as fallback.
> 

Off hand no.  Not knowing if you have a copy or a link after a
run could be a bad thing.  Perhaps a ttree config option:
Links = {soft|hard}
Linkfail = {Abort|Copy|Warn}

Generally most of the things I can think of that would cause
link to fail would not be graceful under copy.

> Dustin Frazier <[EMAIL PROTECTED]> writes:
> 
>> Another solution to this problem I've used is to patch ttree to allow
>> the source and destination directory to be the same.  It's actually
>> the first thing I did when I started using TT2 because it just seemed
>> like the most natural way to work, templates in the same directory as
>> the HTML/PHP files that they were generating.  I have 'accept'
>> directives only for my template extensions (tt2/ttp) and don't have
>> any 'copy' directives.  I have to filter out template extensions and
>> a few template-only directories when I upload the content to our
>> website, but it's pretty easy to do...
> 
> Did any of these changes actually made it in the code base?
> 

Hmm.  Both of these features together could be bad news, 
depending on how they are implemented.  E.g. Link fails,
and it tries to copy, and opens the same name for output
clobbering it.



Using the source and destination tree needs a 'clean' option.
Otherwise if you reorganize your site, you end up with leftovers
in varous places.

E.g.  Suppose you have an Images directory.  Now, you change
a page, and that image is no longer used, how do you fix that
on the web server?  Of coruse it probably doesn't matter.  Server 
packages now routinely give you enough storage that you can use
your spare storage as online backup for your home systems.

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

Reply via email to