[TxMt] Multiple file Template

Alastair Moore alastair at kozmo.co.uk
Wed Dec 6 21:09:48 UTC 2006

Hi guys,

I'm trying to build a template which will consist of an HTML file and  
a CSS file (eventually a number of CSS files in a separate directory)  
but I'm having a few problems. I tried duplicating the Objective-C  
singleton template and essentially copied and pasted the code with a  
few changes. This is what my template code looks like now:

export TM_YEAR=`date +%Y`
export TM_DATE=`date +%Y-%m-%d`
export TM_USERNAME=`niutil -readprop / /users/\$USER realname`

if [[ ! (-f $TM_NEW_FILE || -f $TM_HEADER) ]]; then
    perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' <html_in.html >"$TM_NEW_FILE"
    perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' <css_in.css >"$TM_HEADER"

This creates the HTML file but not the CSS file. Or at least it  
didn't until I reloaded the bundles and discovered "untitled.css" had  
appeared in the template file list alongside html_in.html and  
css_in.css. Very odd! I did some more reading and found a post in the  
mailing list archives (http://article.gmane.org/ 
which Allan mentioned I need to edit an info.plist file.  
Unfortunately I've not been able to find this file anywhere. Could  
anyone suggest where it might be and what I need to edit?

Eventually I want to build a template which looks like


Would this be possible and if so, any pointers on how I might go  
about it?



More information about the textmate mailing list