Mercurial > hg > MakeItSo
annotate templates/script.py @ 27:ac44c36da885
make include example work
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 14 Dec 2010 22:46:56 -0800 |
parents | 08a50935e941 |
children | 3bf29175907c |
rev | line source |
---|---|
4
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/usr/bin/env |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 utlities related to getting JSON into couchdb |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 """ |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 import sys |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 from optparse import OptionParser |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 def main(args=sys.argv[:]): |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 usage = '%prog [options]' |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 parser = OptionParser(usage=usage, description=__doc__) |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 options, args = parser.parse_args(args) |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 if __name__ == '__main__': |
08a50935e941
add a directory for single-file templates
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
16 main() |