Skip to main content

Better line wrapping and formatting for plaintext and Markdown

Project description

flowmark

Flowmark is a new Python implementation of text line wrapping and filling.

It can be used as a more flexible alternative to Python's textwrap with a few more features, such as full customizability of initial and subsequent indentation strings, and more control over when to split words, so it won't break lines within HTML tags.

It also combines line wrapping with support for Markdown and offers Markdown auto-formatting, like markdownfmt, also with controllable line wrapping options.

One key use case is to normalize Markdown in a standard, readable way that makes diffs easy to read and use on GitHub. This can be useful for documentation workflows and also to compare LLM outputs that are Markdown.

Finally, it has options to use heuristics to split on sentences, which can make diffs much more readable. (For an example of this, look at the source to this readme file.)

It aims to be small and simple and have only a few dependencies, currently only marko and regex.

This is a new and simple package (previously I'd implemented something like this for Atom) but I plan to add more support for command line usage and VSCode/Cursor auto-formatting in the future.


This project was built from simple-modern-poetry.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowmark-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flowmark-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file flowmark-0.1.0.tar.gz.

File metadata

  • Download URL: flowmark-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flowmark-0.1.0.tar.gz
Algorithm Hash digest
SHA256 068322aa288d6b279d42a47a2f6f020269bf391544d1ad9ecb9f5c410f673f6e
MD5 f4d68f0a82685ada2215c4f7f1fa3d6e
BLAKE2b-256 bfd1f06460c4799cfa4d42562e3b87e828c21c94c3c86e48c36230600ec95323

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowmark-0.1.0.tar.gz:

Publisher: publish.yml on jlevy/flowmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowmark-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flowmark-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flowmark-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c03aa63fa1beb79123ccffdef3b8681ba72fa14653715cd15269d03bf76836
MD5 5894473c13ddf37554669dc3bbf124a9
BLAKE2b-256 155ebde78f3e7be59e33f07d1416d8441d3e7aa8d8fcaa023cad8f15765978dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowmark-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jlevy/flowmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page