#color #term #terminal #format #style

bunt

Simple macros to write colored and formatted text to a terminal. Based on termcolor, thus also cross-platform

9 releases

0.2.6 Sep 9, 2021
0.2.5 Jun 9, 2021
0.2.4 Nov 19, 2020
0.2.3 Oct 3, 2020
0.1.0 Jul 30, 2020

#65 in Command-line interface

Download history 311/week @ 2022-06-08 271/week @ 2022-06-15 272/week @ 2022-06-22 125/week @ 2022-06-29 136/week @ 2022-07-06 160/week @ 2022-07-13 172/week @ 2022-07-20 150/week @ 2022-07-27 168/week @ 2022-08-03 302/week @ 2022-08-10 247/week @ 2022-08-17 234/week @ 2022-08-24 325/week @ 2022-08-31 387/week @ 2022-09-07 335/week @ 2022-09-14 183/week @ 2022-09-21

1,262 downloads per month
Used in fewer than 13 crates

MIT/Apache

21KB
199 lines

Bunt: simple macro-based terminal colors and styles

CI status of master Crates.io Version docs.rs

bunt offers macros to easily print colored and formatted text to a terminal. It is just a convenience API on top of termcolor. bunt is implemented using procedural macros, but it does not depend on syn and compiles fairly quickly.

Minimum Supported Rust Version: 1.46.0

// Style tags will color/format text between the tags.
bunt::println!("I really like {$yellow}lemons{/$}! Like, {$blue+italic}a lot{/$}.");

// To style a single argument, you can also use the `{[style]...}` syntax. This
// can be combined with style tags.
let v = vec![1, 2, 3];
bunt::println!("Here is some data: {[green]:?}. {$bold}Length: {[cyan]}{/$}", v, v.len());

See the documentation for more information.

Status of this project

This is still a young project, but I already use it in two applications of mine. The syntax is certainly not final yet. Seeking feedback from the community!



License

Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~300–405KB