以控制台友好和可读的方式格式化通过其结构指定的文档
项目描述
不要使用此库:它是为了支持InteractiveCommandLine而编写的,而click库要好得多。我不会修复这个库中的任何东西,并将我的项目迁移到click。
RecursiveDocument是一个Python(2.7+和3.3+)库,以控制台友好和可读的方式格式化通过其结构(部分、子部分、段落等)指定的文档。它非常适合打印命令行可执行程序的帮助信息。
它遵循MIT许可证。它可在Python包索引上找到,其文档由Python托管,其源代码在GitHub上。
快速开始
从PyPI安装
$ pip install RecursiveDocument
导入
>>> from RecursiveDocument import *
创建文档
>>> doc = Document().add( ... Section("Introduction") ... .add("This is the first paragraph of a very interesting story. It begins with this paragraph.") ... .add("After the first paragraph comes the second paragraph. As incredible as it may sound, it can go on and on and on...") ... )
然后打印它
>>> print doc.format() Introduction This is the first paragraph of a very interesting story. It begins with this paragraph. <BLANKLINE> After the first paragraph comes the second paragraph. As incredible as it may sound, it can go on and on and on...
项目详情
关闭
RecursiveDocument-0.5.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 52bbb1500fd2ee3ecfb3d9515b0c8ba71c5b156dda1b1d52f59deef5bc01cb1e |
|
MD5 | a59abc4d094002d714cac2e806e5d3d8 |
|
BLAKE2b-256 | 55a53c31d255d6bc4f5201de846b1788e6d6281aeaca75790eb98dcf5e3beb5a |