<commit_before># Twigg

Twigg collects statistics for a set of Git repositories. It assumes that all the
repositories are in one directory and up-to-date.

## Commands

### `twigg stats` (command-line tool)

Shows how many commits each person has made in a given timespan and in what
repositories.

Usage:

    twigg stats [--verbose|-v] <repos dir> <number of days>

### `twigg app` (web app)

The web app shows the same information as `twigg stats`. To run it, copy
`twiggrc.yml.example` to `~/.twiggrc` and set `repositories_directory` to the
directory that contains all the repositories you want to analyze.

Usage:

    twigg app # assumes `~/.twiggrc` at default location
    TWIGGRC=config.yml twigg app # custom location for configuration file

### `twigg gerrit`

This subcommand clones a set of projects from a Gerrit instance, or updates an
existing set of clones.

    twigg gerrit [--verbose|-v] clone
    twigg gerrit [--verbose|-v] update

### `twigg github`

This subcommand clones a set of projects from a GitHub, or updates an existing
set of clones.

    twigg github [--verbose|-v] clone
    twigg github [--verbose|-v] update

### `twigg init`

Emits a sample `.twiggrc` configuration file to standard out, which you can
redirect into a file; for example, to place the sample file at `~/.twiggrc`:

    twigg init > ~/.twiggrc<commit_msg>Replace references to `twiggrc.yml.example` in the README<commit_after># Twigg

Twigg collects statistics for a set of Git repositories. It assumes that all the
repositories are in one directory and up-to-date.

## Commands

### `twigg stats` (command-line tool)

Shows how many commits each person has made in a given timespan and in what
repositories.

Usage:

    twigg stats [--verbose|-v] <repos dir> <number of days>

### `twigg app` (web app)

The web app shows the same information as `twigg stats`. To run it, configure
`~/.twiggrc` to specify the `repositories_directory` containing all the
repositories you want to analyze (`twigg init` can be used to produce the
`~/.twiggrc` file).

Usage:

    twigg app # assumes `~/.twiggrc` at default location
    TWIGGRC=config.yml twigg app # custom location for configuration file

### `twigg gerrit`

This subcommand clones a set of projects from a Gerrit instance, or updates an
existing set of clones.

    twigg gerrit [--verbose|-v] clone
    twigg gerrit [--verbose|-v] update

### `twigg github`

This subcommand clones a set of projects from a GitHub, or updates an existing
set of clones.

    twigg github [--verbose|-v] clone
    twigg github [--verbose|-v] update

### `twigg init`

Emits a sample `.twiggrc` configuration file to standard out, which you can
redirect into a file; for example, to place the sample file at `~/.twiggrc`:

    twigg init > ~/.twiggrc
{'fraction_non_alphanumeric': 0.09071351738974542, 'fraction_numerical': 0.0, 'mean_word_length': 3.7610921501706485, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4896494', 'n_tokens_mistral': 907, 'n_tokens_neox': 832, 'n_words': 390}