Skip to main content

Pyth is intended to make it easy to convert marked-up text between different common formats.

Marked-up text means text which has:

  • Paragraphs

  • Headings

  • Bold, italic, and underlined text

  • Hyperlinks

  • Bullet lists

  • Simple tables

  • Very little else

Formats I initially want to support are:

  • xhtml

  • rtf

  • pdf (output)

These three formats cover web, Word / OpenOffice, and print.

Design principles

  • Ignore unsupported information in input formats (e.g. page layout)

  • Ignore font issues – output in a single font.

  • Ignore specific text sizes – support relative sizes (bigger, littler) only. Output in a single base size.

  • Have no dependencies unless they are written in Python, and work

  • Make it easy to add support for new formats, by using an architecture based on plugins and adapters.

Examples

See http://github.com/brendonh/pyth/tree/master/examples/

Unit tests

The sources contains some unit tests (written using python unittest module) in the ‘tests’ directory.

To run the tests we can either run them individually as python script, either use python nose. If using nose then we just need to go into the tests directory and invoke nosetest from there (make sure that pyth module is in PYTHONPATH).

Release files for pyth 0.6.0

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

Source distribution (sdist)

Source distribution for pyth 0.6.0
File Size Uploaded
pyth-0.6.0.tar.gz 23.6 kB Details

Release files / pyth-0.6.0.tar.gz

Download URL pyth-0.6.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
85a033904d4a81d194aa1f8cc2b588f64fd5b81c3a4db52ec3896a8c23213cac
BLAKE2b-256 checksum
How to use checksums
458cb01d785d8cab7402a0f14a106ddabccc05e25b4aff4c107d4abf2cf8bfe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.6.0 This release

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

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