Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LukasKalbertodt/bunt
Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.
https://github.com/LukasKalbertodt/bunt
color rust terminal
Last synced: about 1 month ago
JSON representation
Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.
- Host: GitHub
- URL: https://github.com/LukasKalbertodt/bunt
- Owner: LukasKalbertodt
- License: apache-2.0
- Created: 2020-07-29T20:49:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-23T15:01:21.000Z (over 1 year ago)
- Last Synced: 2024-10-06T03:13:44.905Z (2 months ago)
- Topics: color, rust, terminal
- Language: Rust
- Homepage:
- Size: 134 KB
- Stars: 224
- Watchers: 5
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust - LukasKalbertodt/bunt - platform terminal colors and styling with macros [![Build status](https://github.com/LukasKalbertodt/bunt/actions/workflows/ci.yml/badge.svg)](https://github.com/LukasKalbertodt/bunt/actions?query=workflow%3ACI+branch%3Amaster) (Libraries / Command-line)
- awesome-rust-cn - LukasKalbertodt/bunt
- awesome-rust - LukasKalbertodt/bunt - cross-platform terminal colors and styling with macros [![Build status](https://github.com/LukasKalbertodt/bunt/actions/workflows/ci.yml/badge.svg)](https://github.com/LukasKalbertodt/bunt/actions?query=workflow%3ACI+branch%3Amaster) (Libraries / Command-line)
- fucking-awesome-rust - LukasKalbertodt/bunt - cross-platform terminal colors and styling with macros [![Build status](https://github.com/LukasKalbertodt/bunt/actions/workflows/ci.yml/badge.svg)](https://github.com/LukasKalbertodt/bunt/actions?query=workflow%3ACI+branch%3Amaster) (Libraries / Command-line)
- fucking-awesome-rust - LukasKalbertodt/bunt - cross-platform terminal colors and styling with macros [![Build status](https://github.com/LukasKalbertodt/bunt/actions/workflows/ci.yml/badge.svg)](https://github.com/LukasKalbertodt/bunt/actions?query=workflow%3ACI+branch%3Amaster) (Libraries / Command-line)
README
# Bunt: simple macro-based terminal colors and styles
[](https://github.com/LukasKalbertodt/bunt/actions/workflows/ci.yml)
[](https://crates.io/crates/bunt)
[](https://docs.rs/bunt)`bunt` offers macros to easily print colored and formatted text to a terminal.
It is just a convenience API on top of [`termcolor`](https://crates.io/crates/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
```rust
// 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**](https://docs.rs/bunt) 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!](https://github.com/LukasKalbertodt/bunt/issues/1)
---
## 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.