comparison makeitso/makeitso.py @ 76:7909dfaef33b

note about adding more metadata
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 08 Jan 2011 10:53:17 -0800
parents b91133e3b02d
children 2c1310e94645
comparison
equal deleted inserted replaced
75:ec35e5763b52 76:7909dfaef33b
200 # remove makeitso shebang if it has one 200 # remove makeitso shebang if it has one
201 if shebang_re.match(content): 201 if shebang_re.match(content):
202 content = os.linesep.join(content.splitlines()[1:]) 202 content = os.linesep.join(content.splitlines()[1:])
203 203
204 variables = variables or {} 204 variables = variables or {}
205 variables['here'] = parent_uri(uri) 205 if 'here' not in variables:
206 variables['here'] = parent_uri(uri)
207 # TODO: could add other metadata about the uri,
208 # such as last modification time'
209
206 ContentTemplate.__init__(self, content, name=uri, 210 ContentTemplate.__init__(self, content, name=uri,
207 interactive=interactive, 211 interactive=interactive,
208 variables=variables) 212 variables=variables)
209 213
210 def substitute(self, **variables): 214 def substitute(self, **variables):