Skip to main content

A variance-optimal paragraph formatter

Project description

inflow

A variance-optimal paragraph formatter. It has only three rules:

  1. Minimize the variance of the lengths of each line...
  2. ...subject to the constraint that the number of lines is smallest.
  3. Ignore the last line, while making sure it's shorter than average.

The program inflow reads its input from stdin and writes to stdout. It takes a single positional argument, the maximum number of characters per line, e.g. inflow 72. The default width if unspecified is 79.

A previous version of this program was called far.

See far: a (f)ast re-write of the Unix utility p(ar) for more information.

Installation

Inflow is packaged in nixpkgs as pkgs.inflow.

Editor integration

  • (neo)vim: set formatprg to inflow or inflow 72
  • emacs: far.el

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

python_inflow-1.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

python_inflow-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file python_inflow-1.0.1.tar.gz.

File metadata

  • Download URL: python_inflow-1.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for python_inflow-1.0.1.tar.gz
Algorithm Hash digest
SHA256 099aeb3078863b0290a5764e7390ae925ab0c4ebafecf099ce43d91fbcca36e5
MD5 0bd54bc70387423d1612d47473ce569c
BLAKE2b-256 329af5642833f3e3c157bf52eaa8f4b00934e9c50717f1a90787daa536173df2

See more details on using hashes here.

File details

Details for the file python_inflow-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_inflow-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for python_inflow-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8bc72509f6c026145a0c1f44b6b59266a51decb2190b232f471ae126b475818
MD5 454306b438d972688b9f27dc5743ad99
BLAKE2b-256 9fe5586b09b51f0538031c10d5d1bb1289943d1fd3d7e3a25de0e92cffe0c118

See more details on using hashes here.

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