K
Kaspar Schiess
Proud to announce the first release (0.2) of Text::Reform.
Text::Reform is a port of the Perl Text/Reform library. The original
port is done by me, Austin Ziegler has helped me getting the release
ready thereby avoiding public disgrace. This is why he gets public
thanks.
Version number will bump up to 1.0 once I judge the interface and
the code to be beautiful Ruby, right now it's just another port.
What does it do ?
-----------------
Reform#format takes a series of format (or "picture") strings followed
by replacement values, interpolates those values into each picture
string, and returns the result.
In examples:
# numbers...
r.format("]]]].[[", "1234\n123")
#> 1234.0
#> 123.0
# strings...
r.format("[[[[[[[[[[[[[[", "The Newton-Raphson methodology")
#> The Newton-Ra-
#> phson methodo-
#> logy
# and combinations:
text = "A big long piece of text to be formatted exquisitely"
count = 1
output = ''
output << r.format(" |||| <<<<<<<<<< ", count, text)
output << r.format(" ---------------- ",
" ^^^^ ]]]]]]]]]]| ", count+11, text)
#> 1 A big long
#> ----------------
#> 12 piece of|
#> text to be|
#> formatted|
#> exquisite-|
#> ly|
Where can I get it ?
--------------------
As a gem:
gem install text-reform
Or as a source tar.gz:
http://rubyforge.org/frs/?group_id=294
What can I do for you ?
-----------------------
You can send me feedback and/or post bugs on our
Text-Formatting rubyforge page located at
http://rubyforge.org/projects/text-format
You can also join our mailing lists and discuss your text formatting
needs with us.
Enjoy !
kaspar
on behalf of the Text Formatting project team
www.tua.ch/ruby
Text::Reform is a port of the Perl Text/Reform library. The original
port is done by me, Austin Ziegler has helped me getting the release
ready thereby avoiding public disgrace. This is why he gets public
thanks.
Version number will bump up to 1.0 once I judge the interface and
the code to be beautiful Ruby, right now it's just another port.
What does it do ?
-----------------
Reform#format takes a series of format (or "picture") strings followed
by replacement values, interpolates those values into each picture
string, and returns the result.
In examples:
# numbers...
r.format("]]]].[[", "1234\n123")
#> 1234.0
#> 123.0
# strings...
r.format("[[[[[[[[[[[[[[", "The Newton-Raphson methodology")
#> The Newton-Ra-
#> phson methodo-
#> logy
# and combinations:
text = "A big long piece of text to be formatted exquisitely"
count = 1
output = ''
output << r.format(" |||| <<<<<<<<<< ", count, text)
output << r.format(" ---------------- ",
" ^^^^ ]]]]]]]]]]| ", count+11, text)
#> 1 A big long
#> ----------------
#> 12 piece of|
#> text to be|
#> formatted|
#> exquisite-|
#> ly|
Where can I get it ?
--------------------
As a gem:
gem install text-reform
Or as a source tar.gz:
http://rubyforge.org/frs/?group_id=294
What can I do for you ?
-----------------------
You can send me feedback and/or post bugs on our
Text-Formatting rubyforge page located at
http://rubyforge.org/projects/text-format
You can also join our mailing lists and discuss your text formatting
needs with us.
Enjoy !
kaspar
on behalf of the Text Formatting project team
www.tua.ch/ruby