Skip to main content

Docutils Tiny HTML Writer

This is a fork of https://github.com/ondratu/docutils-tinyhtmlwriter which adresses a few HTML 5 validation errors and warnings.

Docutils Tiny HTML Writer is another docutils html writer, with very light html output. It will create mainly for use in other project’s like doc generators or web publishers, which want to use their own html headers and footers.

One of possible use:

from docutils.core import publish_string, publish_parts
from docutils_tinyhtml import Writer
from sys import version_info

if version_info[0] < 3:
    from io import open

writer = Writer()
with open("README.rst", encoding="utf-8") as f:
    rst = f.read()

# store full html output to html variable
html = publish_string(source=rst,
                      writer=writer,
                      writer_name='html',
                      settings_overrides={'link': 'link', 'top': 'top'})

# disable system message in html, no in stderr
parts = publish_parts(source=rst,
                      writer=writer,
                      writer_name='html',
                      settings_overrides={'no_system_messages': True})

# store only html body
body = parts['html_title'] + parts['body'] + parts['html_line'] + \
    parts['html_footnotes'] + parts['html_citations'] + \
    parts['html_hyperlinks']

Or you can use rst2html-tiny command tool like standard rst2html:

~$ rst2html-tiny README.rst > README.html       # generate html from reStructured text
~$ rst2html-tiny -h                             # help output

If you have installed recommonmark from https://github.com/rtfd/recommonmark you can use md2html-tiny tool for MarkDown source codes.

Installation

~$ pip install docutils-tinyhtmlwriter

Metadata

Release files for docutils-tinyhtmlwriter-fork 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docutils-tinyhtmlwriter-fork 1.2.2
File Size Uploaded Provenance Actions
docutils-tinyhtmlwriter-fork-1.2.2.tar.gz 9.5 kB Without provenance Details for docutils-tinyhtmlwriter-fork-1.2.2.tar.gz

Release files / docutils-tinyhtmlwriter-fork-1.2.2.tar.gz

Download URL docutils-tinyhtmlwriter-fork-1.2.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4faafef4dd94341bd179189cff87149f394035be02b6f7c8a7588e7990ccf5c2
BLAKE2b-256 checksum
How to use checksums
fb5e013c6857c216225e450371d63841cd4b460d3767c51394a112746ffbb841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for docutils-tinyhtmlwriter-fork 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page