一种命令行工具,用于将文档从存储库构建为HTML文件。最初基于https://github.com/juju/docs/blob/master/tools/mdbuild.py。

ubuntudesign.documentation-builder的Python项目详细描述


build statuscode coverage

一种工具,用于从 包含标记文件的远程Git存储库。

安装

安装documentation-builder的最佳方法是使用snap

sudo snap install documentation-builder

如果您的系统上没有snap,也可以使用pip3

pip3 install ubuntudesign.documentation-builder

有关详细信息,请参见the documentation

开发

文档生成器是一个python模块。主应用程序代码位于 ubuntudesign/documentation_builder。更新 到标记或样式应该在the default template中进行。

检查更改

要检查对documentation builder所做的更改,在可编辑模式下,在封装的环境中本地安装模块可能是最简单的:

python3 -m venv env3 &&source env3/bin/activate  # Create encapsulated environment
pip install -e .  # Install the module in editable mode

documentation-builder --source-folder docs  # build the documentation-builder's own documentation
xdg-open build/en/index.html  # Open up the documentation page

关注变化

关于ubuntu等人。您可以使用inotifywait监视源文件的更改,并在发生以下更改时重新生成:

sudo apt install inotify-tools  # Ensure inotifywait is installed
# Force rebuild docs when anything changes in the source folder
while inotifywait -r -e close_write "./ubuntudesign";do bin/documentation-builder --force --source-folder docs;done

测试

运行测试:

./setup.py test

调试

运行特定测试:

./setup.py test --addopts tests/test_operations.py::test_find_files

可以通过adding a debugger to the code调试测试并再次运行测试。

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

推荐PyPI第三方库


热门话题
java将spring j_spring_安全检查迁移到登录   log4j2中自定义appender中AppConfig的java问题   在将java转换为Json时是否可以忽略内部类名和变量   用java将PDF文件转换为十六进制格式   java将值从AsyncTask返回到主类   java如何导入带有部署变量类名的静态函数?   java Spring Boot@ConfigurationProperties未从环境检索属性   java为什么API调用需要80毫秒的延迟才能到达控制器(在Google应用程序引擎中)?   XML配置中MarshallingMessageConverter中的java设置MarshallTo获取无效属性“MarshallTo”   java从群中获取facebook帖子   @ComponentScan的java excludeFilters不起作用   java将单选按钮值从一个类传递到另一个类   java使JTextArea在Swing中可滚动   java Android增强现实应用程序:将球坐标旋转到设备坐标系