使用sphinx创建和查看文档

1. 安装pip

$ sudo apt-get install python-pip

 

2. 安装全文本浏览器lynx

$ sudo apt-get install lynx

 

3. 使用pip安装sphinx

$ pip install sphinx

 

4. sphinx-quickstart可以快速新建一个新的文档记录

$ sphinx-quickstart

 

5. 对于某些从网上下载的文档源码,只需要找到conf.py所在的目录,比如source,在里面使用如下的命令即可。

$ sphinx-build -b html . output

此时生成的html结果全部位于新创建的output目录,首页是index.html。

 

6. 可以通过普通的GUI浏览器查看,因为是文档,便于文本界面显示,也可以利用我们刚刚下载的lynx浏览器查看,只需要

$ lynx index.html

就行了。

posted @ 2015-01-02 22:29  王智愚  阅读(579)  评论(0编辑  收藏  举报