changeset 57:074a32920f7c

stub for a command-line parser
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 Jan 2011 14:27:09 -0800
parents 728cae02a6ed
children 112bf081148c
files makeitso/cli.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makeitso/cli.py	Thu Jan 06 14:27:09 2011 -0800
@@ -0,0 +1,15 @@
+"""
+command line parser for MakeItSo
+"""
+
+from optparse import OptionParser
+
+def parser(template):
+  """
+  return a command line parser for the template
+  """
+  usage = '%prog [options]'
+  description = getattr(template, 'description', None)
+  parser = OptionParser(usage=usage, description=description)
+  return parser
+