def activate(self):
"""
Activates GwDocumentsInfo by registering:
* 2 commands (doc, doc_list)
* 1 document (documents_overview)
"""
self.commands.register("doc_list", "List all documents", self._list_documents)
self.commands.register("doc", "Shows the documentation", self._show_documentation)
self.commands.register("doc_write", "Stores documents as files ", self._store_documentation,
params=[Argument(("path",),
required=True),
Option(("--html", "-h"),
required=False,
help="Will output html instead of rst",
default=False,
is_flag=True),
Option(("--overwrite", "-o"),
required=False,
help="Will overwrite existing files",
default=False,
is_flag=True),
Option(("--quiet", "-q"),
required=False,
help="Will suppress any user interaction",
default=False,
is_flag=True)
])
self.documents.register(name="documents_overview",
content=documents_content,
description="Gives an overview about all registered documents")
评论列表
文章目录