comparison makeitso/makeitso.py @ 41:9956e13558dd

stub out what API templates will look like; put these in a separate file as theres no reason to clutter up the command line entry point any further
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 03 Jan 2011 14:18:59 -0800
parents 6b4c8f23192f
children 73dac34d2692
comparison
equal deleted inserted replaced
40:6b4c8f23192f 41:9956e13558dd
322 if len(self.templates) > 1 and not os.path.exists(self.output): 322 if len(self.templates) > 1 and not os.path.exists(self.output):
323 os.makedirs(self.output) 323 os.makedirs(self.output)
324 for template in self.templates: 324 for template in self.templates:
325 template.substitute(**variables) 325 template.substitute(**variables)
326 326
327 ### command line stuff 327 ### command line interface
328 328
329 def invocation(url, **variables): 329 def invocation(url, **variables):
330 """returns a string appropriate for TTW invocation""" 330 """returns a string appropriate for TTW invocation"""
331 variables_string = ' '.join(['%s=%s' % (i,j) for i,j in variables.items()]) 331 variables_string = ' '.join(['%s=%s' % (i,j) for i,j in variables.items()])
332 return 'python <(curl %s) %s %s' % (location, url, variables_string) 332 return 'python <(curl %s) %s %s' % (location, url, variables_string)