FreeType的API参考文档生成器。

docwriter的Python项目详细描述


Build StatusPyPI version

自由类型docwriter

docwriter是freetype库的api文档生成器,它从freetype头文件中提取和构建标记文档。

安装

运行pip install docwriter(有关自动使用virtualenv的信息,请参见下面的(4)。它需要Python2.7+或3.4+才能运行。

生成文档的步骤

  1. 确保使用pip安装docwriter

  2. here克隆freetype2存储库。

  3. FreeType生成系统可用于生成文档:

    sh autogen.sh
    ./configure
    make refdoc
    
  4. 或者,步骤1和make目标可以替换为make refdoc-venv。这将在单独的虚拟环境中自动安装所有需求。有关virtualenv用法的更多信息,请参见here

开发使用

  1. 克隆此存储库。

  2. here克隆freetype2存储库。

  3. 在您的环境中运行pip install -r requirements.txt(推荐使用virtualenv)。

  4. include/目录从freetype2复制到docwriter

  5. docwriter目录中运行:

    	python -m docwriter                      \
    		--prefix=ft2                     \
    		--title=FreeType-2.9.1           \
    		--output=./docs/reference        \
    		./include/freetype/*.h           \
    		./include/freetype/config/*.h    \
    		./include/freetype/cache/*.h
    
  6. 标记文件应该在docs/reference/markdown/中生成。静态站点可以通过在docs/reference中运行mkdocs build来呈现。阅读有关mkdocshere的更多信息。

使用信息

docwriter [-h] [-t T] -o DIR [-p PRE] [-q | -v] files [files ...]

DocWriter Usage information

positional arguments:
  files                 list of source files to parse, wildcards are allowed

optional arguments:
  -h, --help            show this help message and exit
  -t T, --title T       set project title, as in '-t "My Project"'
  -o DIR, --output DIR  set output directory, as in '-o mydir'
  -p PRE, --prefix PRE  set documentation prefix, as in '-p ft2'
  -q, --quiet           run quietly, show only errors
  -v, --verbose         increase output verbosity

运行测试

有两种可能的测试方案:

  1. 在py27和py36上运行测试(使用tox-需要安装两个python版本)。
  2. 在当前安装的python版本上运行测试。

具体如下。

使用毒物进行测试

在PY27和PY36上测试:

  1. 确保tox已安装:

    pip install tox
    
  2. 确保PY27和PY36都可用。

  3. 运行测试:

    tox
    

在单个python版本上测试

使用pytest在当前python版本上测试:

  1. 确保pytest已安装:

    pip install pytest
    
  2. 运行测试:

    cd tests/
    python -m pytest
    

许可证

这个库是根据FreeType License授权的。

历史记录

这个图书馆最初是由david turner写成的docmaker,它收集并呈现 HTML文档。它已经被多次修改,包括一个主要的重构 允许多种输出格式。当前的docwriter是最大的重写,有很多 允许其更灵活、可读、可维护和可用的更改和添加。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Google应用程序引擎FreeMarker模板java。安全AccessControlException   在Java中,空字符串(“”)如何存储在内存中?   java如何使用PUT进行创建   java无法构造com的实例。谷歌。云数据存储。钥匙   Java递归中的堆栈溢出错误   java通过结构化设计模式重构冗余代码   javascript使用Selenium IDE 2.9.1上传文件   JAVAutil。扫描仪在Java中将文本文件加载到对象中   这个JAVA程序的时间复杂度是多少   java Springboot+tomcat+ssh=连接链路故障   矢量Java不安全操作   用于Java不同生成代码的协议缓冲区gRPC protobuf生成器   java OSGi为什么我的包命名为“unknown0.0.0”和MANIFEST。MF文件被覆盖了吗?   java日期保持为空(Android)   使用stax解析器java解析xml   java有一种方法可以在运行时确定对象是否是使用Lambdaj创建的。关于()方法?