annotate intentmademanifest/main.py @ 14:6715102c5a86

update
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 10 May 2013 10:06:21 -0700
parents 67cfeffa0d90
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/usr/bin/env python
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 python workflow engine via directed graph
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 """
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 import sys
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 import optparse
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 def main(args=sys.argv[:]):
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 # parse command line options
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 usage = '%prog [options]'
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14 class PlainDescriptionFormatter(optparse.IndentedHelpFormatter):
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15 """description formatter for console script entry point"""
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
16 def format_description(self, description):
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17 if description:
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
18 return description.strip() + '\n'
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 else:
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
20 return ''
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
21 parser = optparse.OptionParser(usage=usage, description=__doc__, formatter=PlainDescriptionFormatter())
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
22 options, args = parser.parse_args(args)
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
23
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
24 if __name__ == '__main__':
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
25 main()
67cfeffa0d90 stub from template
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
26