text to html script

869 views Asked by At

Does anyone have or know of a Ruby script that converts text to html?

Example:

I have a file that contains the following text:

Host Name

Info1
Line1
Info2
Line2

I want to have ruby convert it to the following html output

Host Name

Info1
Line1
Info2
Line2

I tried running RedCloth but got the following error:

The program can't start because msvcrt-ruby18.dll is missing

Thanks

Thanks

1

There are 1 answers

1
Elf Sternberg On BEST ANSWER

That depends upon what you mean by "text to HTML." There are several "web text generators" that convert easy-to-read free text with minimal markup (asterisks to indicate bold, double-spaced paragraphs get surrounded in <p> tags, etc). The most common, for Ruby, are Redcloth, which implements Textile free text, and Bluecloth, which implements Markdown.