# HG changeset patch # User Ludovic Chabant # Date 1443152094 25200 # Node ID 49953d5cef0f29330ebdd4a1160593c5166d13a9 # Parent d379a6a601b15918066da63f12af1115d152fb2f linksfrom/linksto: Fix broken command. diff -r d379a6a601b1 -r 49953d5cef0f wikked/commands/query.py --- a/wikked/commands/query.py Thu Sep 24 20:33:30 2015 -0700 +++ b/wikked/commands/query.py Thu Sep 24 20:34:54 2015 -0700 @@ -13,7 +13,8 @@ self.description = "Lists page names in the wiki." def setupParser(self, parser): - parser.add_argument('--fs', + parser.add_argument( + '--fs', help="Lists pages by scanning the file-system directly", action='store_true') @@ -89,12 +90,13 @@ self.description = "Gets the links going out from a given page." def setupParser(self, parser): - parser.add_argument('url', + parser.add_argument( + 'url', help="The page from which the links come from", nargs=1) def run(self, ctx): - page = ctx.wiki.getPage(ctx.args.url) + page = ctx.wiki.getPage(ctx.args.url[0]) for l in page.links: logger.info(l) @@ -107,12 +109,13 @@ self.description = "Gets the links going to a given page." def setupParser(self, parser): - parser.add_argument('url', + parser.add_argument( + 'url', help="The page to which the links go to", nargs=1) def run(self, ctx): - page = ctx.wiki.getPage(ctx.args.url) + page = ctx.wiki.getPage(ctx.args.url[0]) for l in page.getIncomingLinks(): logger.info(l)