Mercurial > hg > MakeItSo
annotate TODO.txt @ 102:ad5fd3eb6674
template fixes....not the best, but will do
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 11 Jan 2011 16:30:52 -0800 |
parents | 6e08cca7d656 |
children | a7a7c364568a |
rev | line source |
---|---|
8 | 1 Planned features: |
2 | |
3 - Have a filepath or URL as the basic thing that gets "filled". (These | |
4 should be files, directories, entry_points, or URLs) | |
5 | |
6 - There'd be hooks, so you could define a Python file in the control | |
7 config, and have stuff like: | |
8 | |
9 def wrap(filename, rendered_content, vars) | |
10 def conflict(filename, prev_content, new_content, vars) # Could do prepend here, for instance | |
11 def some_helper_func() | |
12 | |
13 - An option to display this at the end of the run: | |
14 | |
15 makeitso -t my/template/ var1=value var2=value | |
16 | |
17 Then you can easily rerun the command | |
18 | |
19 - ability to specify delimeters (both for file interpolation and | |
20 filename interpolation); normally, i'd want '${' + '}', but this | |
21 works poor with, say, bash scripts, and not having this makes it | |
22 difficult to write templates that make other templates | |
23 | |
24 - should be able to contain as much information as possible in a | |
25 single file. Since most often I want to give someone (possibly | |
26 myself) a single file to run, it would be nice to have some local | |
27 maximum of the product of flexibility and legibility | |
28 | |
29 - the ability to create a self-executing script from a file for easy | |
30 portability | |
31 | |
32 - ability to find the variables used in templates; I find this | |
33 absolutely critical. In PasteScript, this isn't there (unless you | |
34 use cheetah) and it is problematic if you want to deal with | |
35 templates programmatically. If you do allow things, like | |
36 single-file templates, then this becomes mandatory. This is to say, | |
37 amongst other things, there should be a command-line option that | |
38 will list the template variables. | |
39 | |
40 - ability to make existing directory structures or files into | |
41 templates | |
42 | |
43 - ability to use defaults (--use-defaults) when they are specified | |
44 | |
45 - ability to save variables used in a run into a file: | |
46 | |
47 makeitso --save-variables=myvars.txt mytemplate | |
48 | |
49 - ability to have executing script files (for packaged tests or via a shebang) | |
50 | |
51 - a dotfile for metadata (e.g. ~/.makeitso) | |
52 | |
53 - hooks for things to do after creation (licensing, uploading | |
54 somewhere, creating a repository, etc) | |
55 | |
56 - not having to name template files 'foo_tmpl'; it is better not to | |
57 munge the file extension at all and have other mechanisms for | |
58 denoting files to be interpolated | |
59 | |
60 - ability to use python in interpolation | |
61 | |
62 - backwards compatability with pastescript templates | |
63 | |
64 - a web interface (or a few) | |
65 | |
66 - Like pastescript currently does, the ability to apply templates | |
67 sequentially. | |
68 | |
69 Files: | |
70 | |
71 - ability to interpolate single files (or strings) | |
72 | |
73 Directories: | |
74 | |
75 - a file like makeitso.ini (in that directory) can control stuff | |
76 | |
77 Nice-to-haves: | |
78 | |
79 - ability to munge files (e.g. combining setup.py from several | |
80 packages) [HARD] | |
81 | |
82 - ability to push changes from a downstream instance to a template [HARD] | |
83 | |
84 - It would also be nice (but not required) to be able to control how | |
85 things get put together. That is, for a setup.py or a README, what | |
86 do you do? For the latter, you probably mostly want append. For | |
87 the former you want to do various things : e.g. add dependencies, | |
88 add entry points, etc. So we should figure out a way to write a | |
89 template like that and have each template applied e.g. increment | |
90 dependencies. So the latter are like variables. | |
91 | |
44
6e08cca7d656
do API variable reading and stubbing a bit for control flow
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
92 - ability to output to a POST request to a URL |
6e08cca7d656
do API variable reading and stubbing a bit for control flow
Jeff Hammel <jhammel@mozilla.com>
parents:
8
diff
changeset
|
93 |
8 | 94 Tempita: |
95 | |
96 - Parsing variables out of tempita should be workable. Even if a | |
97 couple are missed, you could possibly put some in config.ini and | |
98 have the rest detected (so you don't worry about forgetting new variables) |