<commit_before>tomdoc.sh
=========

tomdoc.sh will parse [TomDoc]'d shell scripts and generate pretty documentation
from it.

TomDoc for shell? - Absolutely. Even though TomDoc was originally specified to
document Ruby code, it turns out to be a good fit for shell scripts too. Proof:

```sh
# Public: Current API version in format "x.y.z".
export API_VERSION="1.2.3"

# Public: Execute commands in debug mode.
#
# Takes a single argument and evaluates it only when the test script is started
# with --debug. This is primarily meant for use during the development of test
# scripts.
#
# $1 - Commands to be executed.
#
# Examples
#
#   test_debug "cat some_log_file"
#
# Returns the exit code of the last command executed in debug mode or 0
#   otherwise.
test_debug() {
	test "$debug" = "" || eval "$1"
}
```

Passing the above to tomdoc.sh results in:

### API_VERSION

    Public: Current API version in format "x.y.z".

### test_debug()

    Public: Execute commands in debug mode.

    Takes a single argument and evaluates it only when the test script is started
    with --debug. This is primarily meant for use during the development of test
    scripts.

    $1 - Commands to be executed.

    Examples

      test_debug "cat some_log_file"

    Returns the exit code of the last command executed in debug mode or 0
      otherwise.

For maximum portability, tomdoc.sh was written in POSIX shell and only depends
on ubiquitous Unix tools like `sed(1)` and `grep(1)`.

The project was inspired by [tomdoc.rb].


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

Installing tomdoc.sh is simple:

    $ git clone git://github.com/mlafeldt/tomdoc.sh.git
    $ cd tomdoc.sh
    $ make install

That will install tomdoc.sh to `$HOME/bin` by default. For a different target
directory, set `bindir` accordingly, e.g.

    # make install bindir=/usr/local/bin


Usage<commit_msg>README: mark end of generated markdown<commit_after>tomdoc.sh
=========

tomdoc.sh will parse [TomDoc]'d shell scripts and generate pretty documentation
from it.

TomDoc for shell? - Absolutely. Even though TomDoc was originally specified to
document Ruby code, it turns out to be a good fit for shell scripts too. Proof:

```sh
# Public: Current API version in format "x.y.z".
export API_VERSION="1.2.3"

# Public: Execute commands in debug mode.
#
# Takes a single argument and evaluates it only when the test script is started
# with --debug. This is primarily meant for use during the development of test
# scripts.
#
# $1 - Commands to be executed.
#
# Examples
#
#   test_debug "cat some_log_file"
#
# Returns the exit code of the last command executed in debug mode or 0
#   otherwise.
test_debug() {
	test "$debug" = "" || eval "$1"
}
```

Passing the above to tomdoc.sh results in:

### API_VERSION

    Public: Current API version in format "x.y.z".

### test_debug()

    Public: Execute commands in debug mode.

    Takes a single argument and evaluates it only when the test script is started
    with --debug. This is primarily meant for use during the development of test
    scripts.

    $1 - Commands to be executed.

    Examples

      test_debug "cat some_log_file"

    Returns the exit code of the last command executed in debug mode or 0
      otherwise.

(end of generated markdown)

For maximum portability, tomdoc.sh was written in POSIX shell and only depends
on ubiquitous Unix tools like `sed(1)` and `grep(1)`.

The project was inspired by [tomdoc.rb].


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

Installing tomdoc.sh is simple:

    $ git clone git://github.com/mlafeldt/tomdoc.sh.git
    $ cd tomdoc.sh
    $ make install

That will install tomdoc.sh to `$HOME/bin` by default. For a different target
directory, set `bindir` accordingly, e.g.

    # make install bindir=/usr/local/bin


Usage
{'fraction_non_alphanumeric': 0.09054699946893255, 'fraction_numerical': 0.0053106744556558685, 'mean_word_length': 3.324913892078071, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '34550', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1101, 'n_words': 500}