nomoreflash
nomoreflash

Reputation: 4759

text to html script

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

Upvotes: 1

Views: 871

Answers (1)

Elf Sternberg
Elf Sternberg

Reputation: 16361

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.

Upvotes: 2

Related Questions