Tuicrown is a Nim library for rich text and beautiful formatting in the terminal.
Generated with
./tests/test_all_rich_examples.nim
.
This is possible with a very easy syntax as follows.
[style]
: Styles are defined inside[
and]
.[/style]
:/
means to revert (undo) the style.[/]
: Reverts all style modification.
Such that...
let console = newTuiConsole(newTuiConsoleOptions()) # Console object with default options
console.print("[green]green text[/]")
console.print("[i]italic text[/]")
console.print("[i red]red and italic text[/]")
console.print("[u yellow]yellow and underlined,[/yellow] only color is removed,[i bg:blue] and now added italic with blue background")
❗ This is still in alpha stage.
- API may change without notice.
nimble install https://github.com/pysan3/tuicrown
- I will release this as a nimble package after
v1.0.0+
. - Coming soon!!
- Check Milestone 0.99 for progress.
import tuicrown/tuiconsole
let console = newTuiConsole(newTuiConsoleOptions()) # Console object with default options
console.print("[i green]italic green text[/]")
Tuicrown
's syntax is inspired by the Rich python library.
TODO: doc
- Color
- ForegroundColor
- BackgroundColor
TODO: doc
- Documentation
- Tests
- Windows support