A simple Python API for generating RestructuredText.
OTHER License
Bot releases are visible (Hide)
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 11 months ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 1 year ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Incorporates extensive and excellent work from @amateja - Thanks very much Andrzej!
Use tabulate to replace table handling code as suggested in thclark/rstcloth#9.
BREAKING CHANGE: tabulate is now a dependency.
Add list-table support
Store reStructuredText data into stream instead of list (faster, especially if piping into a file)
BREAKING CHANGE: The RstCloth().data
property is no longer a list but a stream, by default going to sys.stdout
BREAKING CHANGE: The write()
method was removed. Instead of:
your_doc.write(output_filename)
You can either open the doc in an open
context:
with open(output_filename, "w", encoding="utf-8") as fp:
d = RstCloth(fp)
d.title('Example Use')
Or, for minimal changes to your code if you were already using write
, create the doc as you would before, but stream into a memory buffer, then write to file at the end:
import io
d = RstCloth(stream=io.StringIO())
d.title('Example Use')
with open(output_filename, "w", encoding="utf-8") as fp:
fp.write(str(d))
List table width and widths options expansion
Admonitions added
Bibliographic fields added
Raw directives added
Contents directive added
Transition marker added
Published by github-actions[bot] over 2 years ago
Published by thclark about 4 years ago
Refactored redundant parts of the library and styled the remainder of the code.
Published by thclark about 4 years ago
Versions up to 0.2.6 were maintained by @tychoish and had entered an unmaintained state.
With this version, @thclark took over project, merged outstanding PRs from over the years, tidied up, sorted docs and devops, made tox
tests run and applied code style throughout.
Begun work of removing Python 2 code.
Still unstable. Pin your versions, people! Versions > 0.9 will adopt proper semver practice.