Skip to content
Browse files

aspirational argparsing

  • Loading branch information...
1 parent 389e19b commit 542e9f882c6f9fcd11d342e25cd02ddfc4f072c0 George Michael Brower committed Aug 31, 2012
Showing with 16 additions and 6 deletions.
  1. +16 −6 bin/hostery
View
22 bin/hostery
@@ -3,17 +3,27 @@ from argparse import ArgumentParser
from hostery import *
def main():
- parser = ArgumentParser(description='uploads git commits to a web host.')
+ parser = ArgumentParser(description='Uploads git commits to a web host.')
subparsers = parser.add_subparsers()
- parser_mark = subparsers.add_parser('mark', help='upload this commit')
- parser_mark.add_argument('-s', '--skip-git', action="store_true", default=False, help='skip git sync')
- parser_mark.set_defaults(func=mark)
-
parser_init = subparsers.add_parser('init', help='configure hostery settings for this repository')
parser_init.add_argument('--ftp', action="store_true", default=False, help='use FTP connection instead of rsync')
parser_init.set_defaults(func=init)
-
+
+ parser_mark = subparsers.add_parser('mark', help='upload this commit and add it to the index')
+ parser_mark.add_argument('-s', '--skip-git', action="store_true", default=False, help='skip git sync')
+ # parser_mark.add_argument('-d', '--deploy', action="store_true", default=False, help='symlink deploy target to this commit folder')
+ parser_mark.set_defaults(func=mark)
+
+ # parser_unmark = subparsers.add_parser('unmark', help='remove a commit from the index')
+ # parser_unmark.add_argument('commit', help='commit to remove')
+ # parser_unmark.set_defaults(func=unmark)
+
+ # parser_deploy = subparsers.add_parser('deploy', help='symlink deploy target to commit folder')
+ # parser_deploy.add_argument('commit', help='hash for commit to deploy')
+ # parser_deplay.set_defaults(func=deploy)
+
+
args = parser.parse_args()
args.func(args)

0 comments on commit 542e9f8

Please sign in to comment.
Something went wrong with that request. Please try again.