gw_documents_info.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:groundwork 作者: useblocks 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号