<commit_before># Rembrandt

A tool for generating syntax-highlighted code, powered by Pygments.

## Installation

Add this line to your application's Gemfile:

    gem 'rembrandt'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rembrandt

## Usage

```irb
> require 'rembrandt'
> highlighter = Rembrandt::Highlighter.new
> highlighter.highlight("class Sample\nend", "ruby")
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request<commit_msg>Adding bits about highlighting files and using a formatter<commit_after># Rembrandt

A tool for generating syntax-highlighted code, powered by Pygments.

## Installation

Add this line to your application's Gemfile:

    gem 'rembrandt'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rembrandt

## Usage

### Basic Highlighting

```irb
> require 'rembrandt'
> highlighter = Rembrandt::Highlighter.new
> highlighter.highlight("class Sample\nend", "ruby")
```

### Highlighting Source in a File

```irb
> require 'rembrandt'
> highlighter = Rembrandt::Highlighter.new
> highlighter.highlight_file("./my_input_file.rb", "ruby")
```

### Using a Formatter

```irb
> require 'rembrandt'
> highlighter = Rembrandt::Highlighter.new
> formatter = Rembrandt::Formatters::Table.new
> code = highlighter.highlight("class Sample\nend", "ruby")
> table = formatter.format(code, "ruby")
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
{'fraction_non_alphanumeric': 0.11891592920353983, 'fraction_numerical': 0.0055309734513274336, 'mean_word_length': 4.498480243161095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '1284307', 'n_tokens_mistral': 611, 'n_tokens_neox': 569, 'n_words': 196}