Skip to main content

Crate colorful_cli

Crate colorful_cli 

Source
Expand description

Colorize English prose by part of speech in the terminal.

This is a driving adapter: it wires the ProseParser and ClosedClassLexicon together through a LexicalAnnotator and renders the classified token stream as ANSI-colored text. The same classification feeds the LSP server; here it lands as color in a terminal with no editor.

Functions§

colorize
Render source with ANSI color per part of speech.
decide_color
Decide whether to emit color, honoring --no-color and the NO_COLOR convention (https://no-color.org/): color is on unless either is set.
lint_report
Render findings as compiler-style diagnostic lines: name:line:col: severity [code]: message. Returns "" for no findings, so clean input prints nothing.
run
Run the CLI over args (the program’s arguments, excluding argv[0]).