<commit_before># Sydney

A Treetop parser for bash alias files. Organize your aliases by
sections and keep comments associated with the aliases they document.

Sydney was created to feed my process an alias file and feed it to
[cheaters](http://github.com/brettterpstra/cheaters), an excellent
cheatsheet system. The output can be either a Treetop::Runtime::SyntaxNode tree, an array of the sections in your alias file, or an array of the
aliases without section groupings.

## Installation

Install it yourself as:

    $ gem install sydney

## Usage

Feed your alias file to Sydney as a single string.

    Sydney.parse(IO.readlines("/my/home/folder/.aliases").join)

Sydney.parse returns a Treetop syntax tree. If you organize your alias
file into sections, preceeding each section with double-banged comments,
you can use `Sydney.sections` to return an array of Section nodes.

Each section contains one or more AliasEntry nodes. An AliasEntry node
ties comments (AliasComment) before an alias to the definition
(AliasDefinition).

## Credits
Sydney was created and is maintained by [<NAME>](http://github.com/geoffharcourt) at [Five Tool Development](http://fivetool.io).

## 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>Further documentation.<commit_after># Sydney

A [Treetop](https://github.com/nathansobo/treetop) parser for bash alias files. Organize your aliases by sections and keep comments associated with the aliases they document.

Sydney was created to feed my process an alias file and feed it to
[cheaters](http://github.com/brettterpstra/cheaters), an excellent
cheatsheet system. The output from Sydney can be a Treetop::Runtime::SyntaxNode tree, an array of the sections in your alias file, or an array of the aliases without section groupings.

## Installation

Install it yourself as:

    $ gem install sydney

## Usage

Feed your alias file to Sydney as a single string.

    Sydney.parse(IO.readlines("/my/home/folder/.aliases").join)

Sydney.parse returns a Treetop syntax tree. If you organize your alias
file into sections, preceeding each section with double-banged comments,
you can use `Sydney.sections` to return an array of Section nodes.

Each section contains one or more AliasEntry nodes. An AliasEntry node
ties comments (AliasComment) before an alias to the definition
(AliasDefinition).

## Credits
Sydney was created and is maintained by [<NAME>](http://github.com/geoffharcourt) at [Five Tool Development](http://fivetool.io).

## Contributing

I'm looking for further ideas for Sydney. Please report parsing issues through [Github Issues](https://github.com/geoffharcourt/sydney/issues). Pull requests for feature additions are welcome!

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.07927811795037061, 'fraction_numerical': 0.003222687721559781, 'mean_word_length': 4.572710951526032, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807584', 'n_tokens_mistral': 885, 'n_tokens_neox': 856, 'n_words': 402}