comparison bitsyblog/cli.py @ 95:dd4abe56edf7

more stubbing; lord how crufty
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 25 Apr 2013 17:13:07 -0700
parents fa221a2d24d9
children bc08a00a7d93
comparison
equal deleted inserted replaced
94:fa221a2d24d9 95:dd4abe56edf7
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 """ 3 """
4 command line interface to bitsyblog 4 command line interface to bitsyblog
5 """ 5 """
6
7 import optparse
8 import sys
9 from user import FilespaceUsers
10
11 def main(args=sys.argv[1:]):
12 """command line entry point for user creation"""
13
14 # command line parser
15 usage = '%prog [options] directory user'
16 parser = optparse.OptionParser(usage=usage)
17 options, args = parser.parse_args(args)
18
19 # get user name
20 if len(args) != 2:
21 parser.error("directory, user not specified")
22 directory, name = args
23
24 # create user
25 users = FilespaceUsers(directory)
26
27 if __name__ == '__main__':
28 main()