<commit_before># GitFame

Pretty-print collaborators sorted by contributions.

## Output

```
Total number of files: 2,053
Total number of lines: 63,132
Total number of commits: 4,330

+------------------------+--------+---------+-------+--------------------+
| name                   | loc    | commits | files | distribution       |
+------------------------+--------+---------+-------+--------------------+
| <NAME>         | 22,272 | 1,814   | 414   | 35.3 / 41.9 / 20.2 |
| <NAME>       | 10,387 | 502     | 229   | 16.5 / 11.6 / 11.2 |
| <NAME>       | 9,689  | 519     | 191   | 15.3 / 12.0 / 9.3  |
| <NAME> | 6,632  | 24      | 60    | 10.5 / 0.6 / 2.9   |
| <NAME>         | 5,769  | 705     | 277   | 9.1 / 16.3 / 13.5  |
| <NAME>            | 2,122  | 24      | 60    | 3.4 / 0.6 / 2.9    |
| <NAME>        | 1,572  | 123     | 63    | 2.5 / 2.8 / 3.1    |
| <NAME>      | 731    | 111     | 35    | 1.2 / 2.6 / 1.7    |
| <NAME>        | 705    | 148     | 51    | 1.1 / 3.4 / 2.5    |
| <NAME>          | 650    | 6       | 5     | 1.0 / 0.1 / 0.2    |
| <NAME>          | 629    | 95      | 31    | 1.0 / 2.2 / 1.5    |
| <NAME>          | 595    | 70      | 77    | 0.9 / 1.6 / 3.8    |
| <NAME>        | 527    | 51      | 97    | 0.8 / 1.2 / 4.7    |
| spontus                | 339    | 18      | 42    | 0.5 / 0.4 / 2.0    |
| Pontus                 | 225    | 49      | 34    | 0.4 / 1.1 / 1.7    |
+------------------------+--------+---------+-------+--------------------+
```

## Installation

`[sudo] gem install git_fame`

## Usage

### Console

Start by navigating to a git repository.

Run `git fame` to generate output as above.

#### Options

- `git fame --bytype` Should a breakout of line counts by file type be output? Default is 'false'
- `git fame --exclude=paths/to/files,paths/to/other/files` Comma separated paths to exclude from the counts. Default is none.
- `git fame --order=loc` Order table by `loc`. Available options are: `loc`, `commits` and `files`. Default is `loc`.
- `git fame --progressbar=1` Should a progressbar be visible during the calculation? Default is `1`.
- `git fame --whitespace` Ignore whitespace changes when blaming files. Default is `false`.
- `git fame --repository=/path/to/repo` Git repository to be used. Default is the current folder.

### Class

Want to work with the data before printing it?

#### Constructor arguments

- **repository** (String) Path to repository.
- **sort** (String) What should #authors be sorted by? Available options are: `loc`, `commits` and `files`. Default is `loc`.
- **progressbar** (Boolean) Should a progressbar be shown during the calculation? Default is `false`.
- **whitespace** (Boolean) Ignore whitespace changes when blaming files. Default is `false`.
- **bytype** (Boolean) Should a breakout of line counts by file type be output? Default is 'false'
- **exclude** (String) Comma separated paths to exclude from the counts. Default is none.

``` ruby
repository = GitFame::Base.new({
  sort: "loc",
  repository: "/tmp/repo",
  progressbar: false,
  whitespace: false
  bytype: false,
  exclude: "vendor, public/assets"
})
```

#### Print table to console

`repository.pretty_puts`

### Statistics

#### GitFame

- `repository.loc` (Fixnum) Total number of lines.
- `repository.commits` (Fixnum) Total number of commits.
- `repository.files` (Fixnum) Total number of files.
- `repository.authors` (Array< Author >) All authors.

#### Author

`author = repository.authors.first`

- Formated
  - `author.loc` (String) Number of lines.
  - `author.commits` (String) Number of commits.
  - `author.files` (String) Number of files changed.
- Non formated
  - `author.distribution` (String) Distribution (in %) between users (loc/commits/files)
  - `author.raw_loc` (Fixnum) Number of lines.
  - `author.raw_commits` (Fixnum) Number of commits.
  - `author.raw_files` (Fixnum) Number of files changed.
  - `author.file_type_counts` (Array) File types (k) and loc (v)

#### A note about authors found

The list of authors may include what you perceive to be duplicate people. If a git user's configured name or email address change over time, the person will appear multiple times in this list (and your repo's git history).  Git allows you to configure this using the .mailmap feature. See ````git shortlog --help```` for more information.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Testing

1. Download fixtures (`spec/fixtures`) using `git submodule update --init`.
2. Run rspec using `rspec spec`.

## Requirements

*GitFame* is tested in *OS X 10.7.4* using Ruby *1.9.2*.

## License

*GitFame* is released under the *MIT license*.<commit_msg>Update requirements<commit_after># GitFame

Pretty-print collaborators sorted by contributions.

## Output

```
Total number of files: 2,053
Total number of lines: 63,132
Total number of commits: 4,330

+------------------------+--------+---------+-------+--------------------+
| name                   | loc    | commits | files | distribution       |
+------------------------+--------+---------+-------+--------------------+
| <NAME>         | 22,272 | 1,814   | 414   | 35.3 / 41.9 / 20.2 |
| <NAME>       | 10,387 | 502     | 229   | 16.5 / 11.6 / 11.2 |
| <NAME>       | 9,689  | 519     | 191   | 15.3 / 12.0 / 9.3  |
| <NAME> | 6,632  | 24      | 60    | 10.5 / 0.6 / 2.9   |
| <NAME>         | 5,769  | 705     | 277   | 9.1 / 16.3 / 13.5  |
| <NAME>            | 2,122  | 24      | 60    | 3.4 / 0.6 / 2.9    |
| <NAME>        | 1,572  | 123     | 63    | 2.5 / 2.8 / 3.1    |
| <NAME>      | 731    | 111     | 35    | 1.2 / 2.6 / 1.7    |
| <NAME>        | 705    | 148     | 51    | 1.1 / 3.4 / 2.5    |
| <NAME>          | 650    | 6       | 5     | 1.0 / 0.1 / 0.2    |
| <NAME>          | 629    | 95      | 31    | 1.0 / 2.2 / 1.5    |
| <NAME>          | 595    | 70      | 77    | 0.9 / 1.6 / 3.8    |
| <NAME>        | 527    | 51      | 97    | 0.8 / 1.2 / 4.7    |
| spontus                | 339    | 18      | 42    | 0.5 / 0.4 / 2.0    |
| Pontus                 | 225    | 49      | 34    | 0.4 / 1.1 / 1.7    |
+------------------------+--------+---------+-------+--------------------+
```

## Installation

`[sudo] gem install git_fame`

## Usage

### Console

Start by navigating to a git repository.

Run `git fame` to generate output as above.

#### Options

- `git fame --bytype` Should a breakout of line counts by file type be output? Default is 'false'
- `git fame --exclude=paths/to/files,paths/to/other/files` Comma separated paths to exclude from the counts. Default is none.
- `git fame --order=loc` Order table by `loc`. Available options are: `loc`, `commits` and `files`. Default is `loc`.
- `git fame --progressbar=1` Should a progressbar be visible during the calculation? Default is `1`.
- `git fame --whitespace` Ignore whitespace changes when blaming files. Default is `false`.
- `git fame --repository=/path/to/repo` Git repository to be used. Default is the current folder.

### Class

Want to work with the data before printing it?

#### Constructor arguments

- **repository** (String) Path to repository.
- **sort** (String) What should #authors be sorted by? Available options are: `loc`, `commits` and `files`. Default is `loc`.
- **progressbar** (Boolean) Should a progressbar be shown during the calculation? Default is `false`.
- **whitespace** (Boolean) Ignore whitespace changes when blaming files. Default is `false`.
- **bytype** (Boolean) Should a breakout of line counts by file type be output? Default is 'false'
- **exclude** (String) Comma separated paths to exclude from the counts. Default is none.

``` ruby
repository = GitFame::Base.new({
  sort: "loc",
  repository: "/tmp/repo",
  progressbar: false,
  whitespace: false
  bytype: false,
  exclude: "vendor, public/assets"
})
```

#### Print table to console

`repository.pretty_puts`

### Statistics

#### GitFame

- `repository.loc` (Fixnum) Total number of lines.
- `repository.commits` (Fixnum) Total number of commits.
- `repository.files` (Fixnum) Total number of files.
- `repository.authors` (Array< Author >) All authors.

#### Author

`author = repository.authors.first`

- Formated
  - `author.loc` (String) Number of lines.
  - `author.commits` (String) Number of commits.
  - `author.files` (String) Number of files changed.
- Non formated
  - `author.distribution` (String) Distribution (in %) between users (loc/commits/files)
  - `author.raw_loc` (Fixnum) Number of lines.
  - `author.raw_commits` (Fixnum) Number of commits.
  - `author.raw_files` (Fixnum) Number of files changed.
  - `author.file_type_counts` (Array) File types (k) and loc (v)

#### A note about authors found

The list of authors may include what you perceive to be duplicate people. If a git user's configured name or email address change over time, the person will appear multiple times in this list (and your repo's git history).  Git allows you to configure this using the .mailmap feature. See ````git shortlog --help```` for more information.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Testing

1. Download fixtures (`spec/fixtures`) using `git submodule update --init`.
2. Run rspec using `rspec spec`.

## Requirements

*GitFame* should work on all Unix based operating system with Git installed.

## License

*GitFame* is released under the *MIT license*.
{'fraction_non_alphanumeric': 0.175817396668723, 'fraction_numerical': 0.051511412708204814, 'mean_word_length': 2.164281067013663, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4056295', 'n_tokens_mistral': 3498, 'n_tokens_neox': 3056, 'n_words': 1128}