Mercurial > hg > MakeItSo
annotate README.txt @ 224:d81d2e263f59
one more time
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 14 Dec 2015 13:58:41 -0800 |
parents | cffc729926b9 |
children |
rev | line source |
---|---|
7 | 1 Make It So! |
2 =========== | |
3 | |
156
a7a7c364568a
note on importing; cleanup
Jeff Hammel <jhammel@mozilla.com>
parents:
97
diff
changeset
|
4 /templates for the people/ |
7 | 5 |
6 So people generally do things the easiest way possible. If you try to | |
7 get people to send you a file with, say, a "one-off" script, they will | |
8 probably hard code a bunch of stuff in it. Then, you're not really | |
9 sure what needs to be changed and because you're human you might make | |
10 a mistake. Worse, its a perl script and you're a python programmer. | |
11 You don't know what that script does! | |
12 | |
13 And this is the time of the iceberg. If it really is a one-off, who | |
14 cares? But quickly one-offs become a deployment story, and not a very | |
156
a7a7c364568a
note on importing; cleanup
Jeff Hammel <jhammel@mozilla.com>
parents:
97
diff
changeset
|
15 efficient one. |
91
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
16 |
92
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
17 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
18 Making a New Template |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
19 --------------------- |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
20 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
21 |
91
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
22 Variable Conventions |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
23 -------------------- |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
24 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
25 MakeItSo! provides a few variables for you. You can include another |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
26 file or URL using {{include(URI)}}, where URI is the file path or the |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
27 URL (of course, internet is required to include remote resources). The |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
28 included resource is not included. |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
29 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
30 Files and URLS being interpolated also have the variable %(here)s, |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
31 which is the parent of their resource. Therefor, using sensible path |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
32 conventions, a neighboring file may be (e.g.) included like |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
33 |
672d2d3ee322
document a bit and add a test for an include example
Jeff Hammel <jhammel@mozilla.com>
parents:
7
diff
changeset
|
34 {{include(here + 'foo.txt')}} |
92
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
35 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
36 The python template asserts several conventions: |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
37 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
38 - project: the project chosen |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
39 - author: author of a project |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
40 - email: author's email |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
41 - url: url of the project |
97
3eb34cad5858
update variable conventions with {{repo}}
Jeff Hammel <jhammel@mozilla.com>
parents:
92
diff
changeset
|
42 - repo: the repository of the project; this will be used for the URL |
3eb34cad5858
update variable conventions with {{repo}}
Jeff Hammel <jhammel@mozilla.com>
parents:
92
diff
changeset
|
43 if it is given and the URL is not |
92
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
44 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
45 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
46 Web Service |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
47 ----------- |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
48 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
49 python has the ability to run files from stdin. This means you can |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
50 run makeitso directly from the web:: |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
51 |
212
cffc729926b9
correct text and bump version
Jeff Hammel <k0scist@gmail.com>
parents:
171
diff
changeset
|
52 python <(curl http://k0s.org/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py) [URI] |
92
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
53 |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
54 This uses the bash shell. If you have another shell you may have to |
bfab7367eb56
add some more documentation tidbits
Jeff Hammel <jhammel@mozilla.com>
parents:
91
diff
changeset
|
55 use another syntax, download the file, or install the package. |
171 | 56 |
57 | |
58 Similar Projects | |
59 ---------------- | |
60 | |
61 * http://cookiecutter.readthedocs.org/ , | |
62 https://github.com/audreyr/cookiecutter | |
63 | |
64 * https://github.com/lucuma/Voodoo |