view makeitso.txt @ 238:a1a615aae3d1

dont give up so easily
author Jeff Hammel <k0scist@gmail.com>
date Thu, 21 Jan 2016 09:48:14 -0800
parents 8f5bfd2e5a35
children
line wrap: on
line source

Make it so!
===========

*A new file templating system*

Requirements:

 - ability to specify delimeters (both for file interpolation and
   filename interpolation);  normally, i'd want '${' + '}', but this
   works poor with, say, bash scripts, and not having this makes it
   difficult to write templates that make other templates

 - ability to find the variables used in templates;  I find this
   absolutely critical.  In PasteScript, this isn't there (unless you
   use cheetah) and it is problematic if you want to deal with
   templates programmatically.  If you do allow things, like
   single-file templates, then this becomes mandatory.
   This is to say, amongst other things, there should be a
   command-line option that will list the template variables.

 - ability to make existing directory structures or files into templates

 - ability to interpolate single files (or strings), especially via an API

 - ability to use defaults (--use-defaults) when they are specified

 - ability to save variables used in a run into a file:
    makeitso --save-variables=myvars.txt mytemplate)

 - ability to have executing script files (for packaged tests or via a shebang)

 - a dotfile for metadata (e.g. ~/.makeitso)

 - hooks for things to do after creation (licensing, uploading
   somewhere, creating a repository, etc)

 - not having to name template files 'foo_tmpl';  it is better not to
   munge the file extension at all and have other mechanisms for
   denoting files to be interpolated

 - single file usability

Nice-to-haves:

 - ability to use python in interpolation [HARD?]

 - backwards compatability with pastescript templates

 - ability to inherit from templates [HARD]

 - ability to munge files (e.g. combining setup.py from several
   packages) [HARD]

 - a web interface (or a few)

 - ability to push changes from a downstream instance to a template [HARD]