cliclr 0.1.2

A very simple wrapper for termcolor.
Documentation
  • Coverage
  • 50%
    6 out of 12 items documented0 out of 7 items with examples
  • Size
  • Source code size: 10.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.57 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • TheNevix/cliclr
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • TheNevix

cliclr

cliclr is a very simple wrapper for the termcolor crate. cliclr is still in the early stages and will be updated frequently to become a feature-rich crate.

Add the correct use

You should add something like this at the top of your file:

use cliclr::{console_line::termcolor::Color, console_line::termcolor::ColorChoice, console_line::termcolor::StandardStream ,ConsoleLine};

This currently imports all what you need.

Create a ConsoleLine object

let console_line = ConsoleLine{
    text: String::from("Hello world!"),
    color: Color::Red
};

Featured functions

Here's a list all the featured functions the crate has.

print_colored_text

Prints colored text to the standard output.

console_line.print_colored_text(&mut stdout);

print_bold_text

Prints colored text that is bold to the standard output.

console_line.print_bold_text(&mut stdout);

print_background_color_text

Prints colored text that has a specefied background color to the standard output.

console_line.print_background_color_text(&mut stdout, Color::Green);

Thank you

Thank you for taking a look at this crate. Any feedback is welcome!