Mercurial > hg > MakeItSo
annotate makeitso/python_package/{{package}}/template.py @ 225:a1b84dabebcf
one more time
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 14 Dec 2015 14:02:14 -0800 |
parents | ad5fd3eb6674 |
children |
rev | line source |
---|---|
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
4 {{project}} template for makeitso |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 """ |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 import sys |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 from cli import MakeItSoCLI |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 from optparse import OptionParser |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 from template import MakeItSoTemplate |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
12 class {{project}}Template(MakeItSoTemplate): |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 """ |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
14 {{project}} template |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 """ |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
16 name = '{{project}}' |
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
17 templates = ['template'] |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
18 look = True |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
19 |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
20 class TemplateCLI(MakeItSoCLI): |
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
21 """ |
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
22 CLI driver for the {{project}} template |
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
23 """ |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
24 |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
25 def main(args=sys.argv[:]): |
82
c434b83ab600
add a template to create templates. tricky, eh?
Jeff Hammel <jhammel@mozilla.com>
parents:
78
diff
changeset
|
26 cli = TemplateCLI() |
102
ad5fd3eb6674
template fixes....not the best, but will do
Jeff Hammel <jhammel@mozilla.com>
parents:
95
diff
changeset
|
27 cli(*args) |
95
e74baa8e6df4
fix CLI interface a bit....write a test for it
Jeff Hammel <jhammel@mozilla.com>
parents:
82
diff
changeset
|
28 |
78
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
29 if __name__ == '__main__': |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
30 main() |
d4184945f8a8
stub out python package creation
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
31 |