Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Monkeypatch Doit's command help (Fix #151)

  • Loading branch information...
commit 20adcf14e90b86efd84630005f8bc8290ec03ec9 1 parent 114afee
@ralsina authored
Showing with 18 additions and 16 deletions.
  1. +18 −16 nikola/plugin_categories.py
View
34 nikola/plugin_categories.py
@@ -65,22 +65,24 @@ def execute(self, options, args):
"""
raise NotImplementedError()
- def help(self):
- """return help text"""
- text = []
- text.append("Purpose: %s" % self.doc_purpose)
- text.append("Usage: nikola %s %s" % (self.name, self.doc_usage))
- text.append('')
-
- text.append("Options:")
- for opt in self.options:
- text.extend(opt.help_doc())
-
- if self.doc_description is not None:
- text.append("")
- text.append("Description:")
- text.append(self.doc_description)
- return "\n".join(text)
+def help(self):
+ """return help text"""
+ text = []
+ text.append("Purpose: %s" % self.doc_purpose)
+ text.append("Usage: nikola %s %s" % (self.name, self.doc_usage))
+ text.append('')
+
+ text.append("Options:")
+ for opt in self.options:
+ text.extend(opt.help_doc())
+
+ if self.doc_description is not None:
+ text.append("")
+ text.append("Description:")
+ text.append(self.doc_description)
+ return "\n".join(text)
+
+DoitCommand.help = help
class BaseTask(BasePlugin):
Please sign in to comment.
Something went wrong with that request. Please try again.