<commit_before>Lovely Rufus
============

Lovely Rufus is an executable and a Ruby library for wrapping paragraphs of text in the spirit of [Par](http://www.nicemice.net/par/).



Usage
-----

Lovely Rufus can be used from the command-line by piping text through the `lovely-rufus` executable:

    $ echo 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;' | lovely-rufus
    The Ballyshannon foundered off the coast of Cariboo,
    And down in fathoms many went the captain and the crew;

Lovely Rufus can also be used from Ruby code through the `TextWrapper` class:

    $ irb
    >> require 'lovely_rufus'
    >> text = 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;'
    >> puts LovelyRufus::TextWrapper.wrap text
    The Ballyshannon foundered off the coast of Cariboo,
    And down in fathoms many went the captain and the crew;

Note that `TextWrapper.wrap` can take optional desired width:

    $ irb
    >> require 'lovely_rufus'
    >> text = 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;'
    >> puts LovelyRufus::TextWrapper.wrap text, width: 15
    The
    Ballyshannon
    foundered off
    the coast of
    Cariboo, And
    down in fathoms
    many went the
    captain and
    the crew;



Features
--------

Currently, Lovely Rufus sports the following features:

* paragraphs are wrapped to the specified width,
* one-letter words are not left at ends of lines,
* email quotes (`>`) are handled properly and normalised (`> > >` → `>>>`),
* email-quoted paragraph breaks are cleared,
* code comments (starting with `#` and `//`) are handled properly,
* multiple paragraphs are wrapped independently.



Name and history
----------------

Lovely Rufus was created as a [Ruby Mendicant University](http://blog.majesticseacreature.com/tag/rubymendicant) project and is named after [a certain _Love Actually_ character](http://en.wikipedia.org/wiki/Love_Actually#Rufus) who’s [exceptionally good at wrapping](https://www.youtube.com/watch?v=E3rB_qx0wRM).



---

© MMX-MMXIV <NAME> <<EMAIL>>, licensed under AGPL-3.0 (see LICENCE)<commit_msg>the happiest of new years<commit_after>Lovely Rufus
============

Lovely Rufus is an executable and a Ruby library for wrapping paragraphs of text in the spirit of [Par](http://www.nicemice.net/par/).



Usage
-----

Lovely Rufus can be used from the command-line by piping text through the `lovely-rufus` executable:

    $ echo 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;' | lovely-rufus
    The Ballyshannon foundered off the coast of Cariboo,
    And down in fathoms many went the captain and the crew;

Lovely Rufus can also be used from Ruby code through the `TextWrapper` class:

    $ irb
    >> require 'lovely_rufus'
    >> text = 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;'
    >> puts LovelyRufus::TextWrapper.wrap text
    The Ballyshannon foundered off the coast of Cariboo,
    And down in fathoms many went the captain and the crew;

Note that `TextWrapper.wrap` can take optional desired width:

    $ irb
    >> require 'lovely_rufus'
    >> text = 'The Ballyshannon foundered off the coast of Cariboo, And down in fathoms many went the captain and the crew;'
    >> puts LovelyRufus::TextWrapper.wrap text, width: 15
    The
    Ballyshannon
    foundered off
    the coast of
    Cariboo, And
    down in fathoms
    many went the
    captain and
    the crew;



Features
--------

Currently, Lovely Rufus sports the following features:

* paragraphs are wrapped to the specified width,
* one-letter words are not left at ends of lines,
* email quotes (`>`) are handled properly and normalised (`> > >` → `>>>`),
* email-quoted paragraph breaks are cleared,
* code comments (starting with `#` and `//`) are handled properly,
* multiple paragraphs are wrapped independently.



Name and history
----------------

Lovely Rufus was created as a [Ruby Mendicant University](http://blog.majesticseacreature.com/tag/rubymendicant) project and is named after [a certain _Love Actually_ character](http://en.wikipedia.org/wiki/Love_Actually#Rufus) who’s [exceptionally good at wrapping](https://www.youtube.com/watch?v=E3rB_qx0wRM).



---

© MMX-MMXV <NAME> <<EMAIL>>, licensed under AGPL-3.0 (see LICENCE)
{'fraction_non_alphanumeric': 0.09477196885428253, 'fraction_numerical': 0.0026696329254727474, 'mean_word_length': 3.59244126659857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 47, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '2417774', 'n_tokens_mistral': 1402, 'n_tokens_neox': 1349, 'n_words': 555}