From 33160dd3ac695fb3cb0c3901a1cf8b7b95b6413e Mon Sep 17 00:00:00 2001 From: maste9 Date: Thu, 29 Jan 2015 08:07:19 +0100 Subject: [PATCH] bla --- picoblogger/main.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/picoblogger/main.py b/picoblogger/main.py index 231367e..8b15170 100755 --- a/picoblogger/main.py +++ b/picoblogger/main.py @@ -6,14 +6,22 @@ from argparse import ArgumentParser # check for arguments and options parser = ArgumentParser(description="Manage your weblog via commandline. Creates a static html5 compliant website with your publications.") + +# general options parser.add_argument('-d','--blog-dir', dest="blog_dir", default='~/public_html/blog', help='path to blog directory (default: %(default)s)') +### subroutines of pb +# 'update' command subparsers = parser.add_subparsers(help="subcommands") parser_update = subparsers.add_parser('update', help='updates blog to current state') -parser_update.add_argument('subsection', choices=['all','articles','archive'], help='sections of blog you may want to update') +parser_update.add_argument('subsection', choices=['all','recent','archive','feed'], help='sections of blog you may want to update') -parser_draft = subparsers.add_parser('draft', help='create, list or edit drafts') +# 'draft' command +parser_draft = subparsers.add_parser('draft', help='create, list, edit or remove drafts') +parser_draft.add_argument('action', choices=['add','list','edit','remove'], help='define what to do with a certain draft') +parser_draft.add_argument('nameorid', choices=['name','id'] +# 'article' command parser_article = subparsers.add_parser('article', help='import, list, edit or delete [article]') args = parser.parse_args()