# HG changeset patch # User Jeff Hammel # Date 1293053409 28800 # Node ID dc18d6db4956e8b7145130f84f7c0456c215674e # Parent ac44c36da885c11d84042beb893ddd0c9043c203 depend on trunk tempita; stubbing for next stage diff -r ac44c36da885 -r dc18d6db4956 makeitso/makeitso.py --- a/makeitso/makeitso.py Tue Dec 14 22:46:56 2010 -0800 +++ b/makeitso/makeitso.py Wed Dec 22 13:30:09 2010 -0800 @@ -133,6 +133,8 @@ print 'Enter %s: ' % i, retval[i] = raw_input() return retval + +### functions for substitution def substitute(content, variables=None): """interactive (for now) substitution""" @@ -149,6 +151,11 @@ variables.update(read_variables(missing)) return template.substitute(**variables) +def substitute_directory(directory, output=None, variables=None): + # TODO: interpolate directory names + +### + def invocation(url, **variables): """returns a string appropriate for TTW invocation""" variables_string = ' '.join(['%s=%s' % (i,j) for i,j in variables.items()]) @@ -159,13 +166,22 @@ # create option parser usage = '%prog [options] template