跳转到主要内容

以控制台友好和可读的方式格式化通过其结构指定的文档

项目描述

不要使用此库:它是为了支持InteractiveCommandLine而编写的,而click库要好得多。我不会修复这个库中的任何东西,并将我的项目迁移到click

RecursiveDocument是一个Python(2.7+和3.3+)库,以控制台友好和可读的方式格式化通过其结构(部分、子部分、段落等)指定的文档。它非常适合打印命令行可执行程序的帮助信息。

它遵循MIT许可证。它可在Python包索引上找到,其文档由Python托管,其源代码在GitHub上。

https://img.shields.io/travis/jacquev6/RecursiveDocument/master.svg https://img.shields.io/coveralls/jacquev6/RecursiveDocument/master.svg https://img.shields.io/codeclimate/github/jacquev6/RecursiveDocument.svg https://img.shields.io/scrutinizer/g/jacquev6/RecursiveDocument.svg https://img.shields.io/pypi/dm/RecursiveDocument.svg https://img.shields.io/pypi/l/RecursiveDocument.svg https://img.shields.io/pypi/v/RecursiveDocument.svg https://img.shields.io/pypi/pyversions/RecursiveDocument.svg https://img.shields.io/pypi/status/RecursiveDocument.svg https://img.shields.io/github/issues/jacquev6/RecursiveDocument.svg https://badge.waffle.io/jacquev6/RecursiveDocument.png?label=ready&title=ready https://img.shields.io/github/forks/jacquev6/RecursiveDocument.svg https://img.shields.io/github/stars/jacquev6/RecursiveDocument.svg

快速开始

从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 (7.7 kB 查看哈希值)

上传时间

由...

AWSAWS 云计算和安全赞助商 DatadogDatadog 监控 FastlyFastly CDN GoogleGoogle 下载分析 MicrosoftMicrosoft PSF赞助商 PingdomPingdom 监控 SentrySentry 错误记录 StatusPageStatusPage 状态页面