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

RecursiveDocument的Python项目详细描述


不要使用这个库:它是为了支持InteractiveCommandLine, 而click库则要好得多。 我不会修复库中的任何内容,我正在将自己的项目迁移到click

recursivedocument是一个python(2.7+和3.3+)库格式,以控制台友好和可读的方式, 通过其结构(节、小节、段落等)指定的文件。 它特别适合打印命令行可执行文件的帮助消息。

它是根据MIT license授权的。 在Python package index上有售, 它的documentation is hosted by Python 它的源代码在GitHub上。

https://img.shields.io/travis/jacquev6/RecursiveDocument/master.svghttps://img.shields.io/coveralls/jacquev6/RecursiveDocument/master.svghttps://img.shields.io/codeclimate/github/jacquev6/RecursiveDocument.svghttps://img.shields.io/scrutinizer/g/jacquev6/RecursiveDocument.svghttps://img.shields.io/pypi/dm/RecursiveDocument.svghttps://img.shields.io/pypi/l/RecursiveDocument.svghttps://img.shields.io/pypi/v/RecursiveDocument.svghttps://img.shields.io/pypi/pyversions/RecursiveDocument.svghttps://img.shields.io/pypi/status/RecursiveDocument.svghttps://img.shields.io/github/issues/jacquev6/RecursiveDocument.svghttps://badge.waffle.io/jacquev6/RecursiveDocument.png?label=ready&title=readyhttps://img.shields.io/github/forks/jacquev6/RecursiveDocument.svghttps://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...

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

推荐PyPI第三方库


热门话题
java Oracle将休眠为ISO 8601日期格式   当有线程时,swing计时器不会停止。睡在Java里面   如何使用swing在java中清空密码字段值(字符串)   如何在编辑文本字段上设置单词java(安卓)   单独类中的java OkHttp请求   java Tomcat配置文件/上下文xml似乎已经崩溃了。请确保它是可分析和有效的。有关详细信息,请参阅服务器日志   java在科尔多瓦的ActivityResult上传递   java如何在映射中保持插入顺序。工厂?   “DataOutputStream”和“ObjectOutputStream”之间的java差异   java从FTP文件列表中获取项目的时间戳   java如何在spring security中为每个人忽略一些资源/URL?   模板类嵌套时新的Java泛型类构造函数问题   java读取并查找文件大小为1GB的行   java如何使用字符串say“stop”停止整数格式的while循环   java是否可以在应用程序启动之间将JVM保留在内存中?   java Springboot出现“出现意外错误(类型=内部服务器错误,状态=500)”的问题