<commit_before>Metior
======

Metior is a source code history analyzer API that provides various statistics
about a source code repository and its change over time.

Currently Metior provides basic support for Git repositories.

If you're interested in Metior, feel free to join the discussion on Convore in
[Metior's group](https://convore.com/metior).

## Examples

### One-liner for some basic statistics

    Metior.simple_stats :git, '~/open-source/metior'

### More fine-grained access to repository statistics

    repo = Metior::Git::Repository '~/open-source/metior'
    repo.commits 'development'         # Get all commits in development
    repo.line_history                  # Quick access to lines added and
                                       # removed in each commit
    repo.significant_authors           # Get up to 3 of the most important
                                       # authors
    repo.significant_commits, 20       # Get up to 20 of the commits changing
                                       # the most lines
    repo.top_authors 'master', 5       # Get the top 5 authors in master

### Get statistics about a set of commits

    Metior::Commit.activity repo.commits
    Metior::Commit.activity repo.authors[author_id].commits

## Requirements

* Grit — a Ruby API for Git
  * [Git](http://git-scm.com) >= 1.6
* Octokit — a Ruby wrapper for the GitHub API
  * JSON — a JSON parser for Ruby

## Documentation

The documentation of the Ruby API can be seen at [RubyDoc.info][1]. The API
documentation of the current development version is also available [there][5].
<commit_msg>Make use of GitHub's syntax highlighting<commit_after>Metior
======

Metior is a source code history analyzer API that provides various statistics
about a source code repository and its change over time.

Currently Metior provides basic support for Git repositories.

If you're interested in Metior, feel free to join the discussion on Convore in
[Metior's group](https://convore.com/metior).

## Examples

### One-liner for some basic statistics

```ruby
Metior.simple_stats :git, '~/open-source/metior'
```

### More fine-grained access to repository statistics

```ruby
repo = Metior::Git::Repository '~/open-source/metior'
repo.commits 'development'         # Get all commits in development
repo.line_history                  # Quick access to lines added and removed in
                                   # in each commit
repo.significant_authors           # Get up to 3 of the most important authors
repo.significant_commits, 20       # Get up to 20 of the commits changing the
                                   # most lines
repo.top_authors 'master', 5       # Get the top 5 authors in master
```

### Get statistics about a set of commits

```ruby
Metior::Commit.activity repo.commits
Metior::Commit.activity repo.authors[author_id].commits
```

## Requirements

* Grit — a Ruby API for Git
  * [Git](http://git-scm.com) >= 1.6
* Octokit — a Ruby wrapper for the GitHub API
  * JSON — a JSON parser for Ruby

## Documentation

The documentation of the Ruby API can be seen at [RubyDoc.info][1]. The API
documentation of the current development version is also available [there][5].

{'fraction_non_alphanumeric': 0.08122461730709153, 'fraction_numerical': 0.006872852233676976, 'mean_word_length': 2.86248492159228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '388385', 'n_tokens_mistral': 913, 'n_tokens_neox': 820, 'n_words': 363}