从Python Docstrings自动生成GitHub Wiki文档 [英] Automatically Generate GitHub Wiki Documentation from Python Docstrings

查看:112
本文介绍了从Python Docstrings自动生成GitHub Wiki文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题说明了一切。我想象的是为我的所有模块,类和函数提供docstrings,并通过github(wiki?)以某种方式很好地浏览文档。另外,文档应该与最新代码同步,这意味着它应该在推送时更新/重新生成。这可能吗?

解决方案

只需输出 docstring 到一个 .md 文件。



像这样:

  pydoc'example_lib> example_lib.md。 


The title says it all. What I imagine is to have docstrings for all of my modules, classes and functions and somehow nicely navigate the doc via github (wiki?). Also, the doc should be in sync with latest code meaning it should be updated/re-generated on push. Is that possible?

解决方案

Just pipe the output of the docstring to a .md file.

Like this:

pydoc 'example_lib > example_lib.md .

这篇关于从Python Docstrings自动生成GitHub Wiki文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆