提供简单的sphinx标记以呈现更改日志显示。
changelog的Python项目详细描述
生成变更日志文件的Sphinx扩展名。
这是一个实验性的,可能没有用的扩展,被 SQLAlchemy项目和相关项目。
配置
conf.py中的示例配置如下:
extensions = [ # changelog extension 'changelog', # your other sphinx extensions # ... ] # section names - optional changelog_sections = ["general", "rendering", "tests"] # tags to sort on inside of sections - also optional changelog_inner_tag_sort = ["feature", "bug"] # how to render changelog links - these are plain # python string templates, ticket/pullreq/changeset number goes # in "%s" changelog_render_ticket = "http://bitbucket.org/myusername/myproject/issue/%s" changelog_render_pullreq = "http://bitbucket.org/myusername/myproject/pullrequest/%s" changelog_render_changeset = "http://bitbucket.org/myusername/myproject/changeset/%s"
用法
changelog引入了changelog和change指令:
==================== Changelog for 1.5.6 ==================== .. changelog:: :version: 1.5.6 :released: Sun Oct 12 2008 .. change:: :tags: general :tickets: 27 Improved the frobnozzle. .. change:: :tags: rendering, tests :pullreq: 8 :changeset: a9d7cc0b56c2 Rendering tests now correctly render.
使用上面的标记,上面的更改将呈现为文档节 每个变更日志,然后将每个变更组织到段落中,包括 标签、提到的票据、拉取请求、变更集的特殊标记。参赛者将 根据^{tt4}的配置按标记分组和排序$ 以及changelog_inner_tag_sort配置。
如果配置有如下部分,也可以使用“复合标记”:
changelog_sections = ["orm declarative", "orm"]
然后更改同时包含orm和declarative标记的条目 分组在名为orm declarative的节下,然后是orm节,其中 只有orm的更改条目将被放置。
其他加价
:ticket:指令将使用changelog_render_ticket标记 要呈现票证链接:
:ticket:`456`