<commit_before>rust-ansi-term
==============

This is a library for controlling colours and formatting, such as red
bold text or blue underlined text, on ANSI terminals.

[![Build Status](https://travis-ci.org/ogham/rust-ansi-term.svg?branch=master)](https://travis-ci.org/ogham/rust-ansi-term)

Installation
------------

It uses [Cargo](http://crates.io/), Rust's package manager. You can
depend on this library by adding this Git repository to your Cargo
dependencies.


Usage
-----

You can format strings by calling the `paint` method on a Colour or a
Style object, passing in the string you want to format. Here are some
examples:

```Rust
fn main() {
    println!("Red text: {}", Red.paint("Red!"));
    println!("Red text: {}", Red.normal().paint("Red!"));  // same as above

    println!("Blue bold text: {}", Blue.bold().paint("Blue bold!"));
    println!("Blue bold text: {}", Blue.normal().bold().paint("Blue bold!"));  // same as above

    println!("Yellow underline text: {}", Yellow.underline().paint("Yellow underline!"));
    println!("Blue on yellow text: {}", Blue.on(Yellow).paint("Blue on yellow!"));

    println!("Colour #134: {}", Fixed(134).paint("A sort of light purple."));
    println!("Colour #221 on #124: {}", Fixed(221).on(Fixed(124)).paint("Mustard in the ketchup."));

    println!("No formatting: {}", Plain.paint("No colours here."));
}
```

Available colours are Black, Red, Yellow, Green, Blue, Purple, Cyan, White, and Fixed(n) up to 256. Available formattings are `.bold()`, `.underline()`, and `.on(colour)`.

<commit_msg>Add Cargo example code<commit_after>rust-ansi-term
==============

This is a library for controlling colours and formatting, such as red
bold text or blue underlined text, on ANSI terminals.

[![Build Status](https://travis-ci.org/ogham/rust-ansi-term.svg?branch=master)](https://travis-ci.org/ogham/rust-ansi-term)

Installation
------------

It uses [Cargo](http://crates.io/), Rust's package manager. You can
depend on this library by adding this Git repository to your Cargo
dependencies:

```toml
[dependencies.ansi_term]

git = "https://github.com/ogham/rust-ansi-term.git"
```


Usage
-----

You can format strings by calling the `paint` method on a Colour or a
Style object, passing in the string you want to format. Here are some
examples:

```Rust
fn main() {
    println!("Red text: {}", Red.paint("Red!"));
    println!("Red text: {}", Red.normal().paint("Red!"));  // same as above

    println!("Blue bold text: {}", Blue.bold().paint("Blue bold!"));
    println!("Blue bold text: {}", Blue.normal().bold().paint("Blue bold!"));  // same as above

    println!("Yellow underline text: {}", Yellow.underline().paint("Yellow underline!"));
    println!("Blue on yellow text: {}", Blue.on(Yellow).paint("Blue on yellow!"));

    println!("Colour #134: {}", Fixed(134).paint("A sort of light purple."));
    println!("Colour #221 on #124: {}", Fixed(221).on(Fixed(124)).paint("Mustard in the ketchup."));

    println!("No formatting: {}", Plain.paint("No colours here."));
}
```

Available colours are Black, Red, Yellow, Green, Blue, Purple, Cyan, White, and Fixed(n) up to 256. Available formattings are `.bold()`, `.underline()`, and `.on(colour)`.


{'fraction_non_alphanumeric': 0.19485749690210658, 'fraction_numerical': 0.013011152416356878, 'mean_word_length': 4.276143790849673, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1708303', 'n_tokens_mistral': 1075, 'n_tokens_neox': 1018, 'n_words': 317}