From: Jim Freeze Date: 2003-02-14T06:13:53+09:00 Subject: Re: Need simplemarkup example On Friday, 14 February 2003 at 6:07:09 +0900, Dave Thomas wrote: > Jim Freeze wrote: > > Hi > > > > Does someone have an example using simplemarkup to convert a text > > file to an HTML file? > > Jim: > > How about this, which converts a file on stdin to HTML on stdout: > > require 'markup/simple_markup' > require 'markup/simple_markup/to_html' > > markup = SM::SimpleMarkup.new > html = SM::ToHtml.new > puts markup.convert(ARGF.read, html) > > Of course the fun comes when you add your own special sequences to the > parsers (for example to handle hyperlinking and other good stuff). There > are examples of doing this in RDoc and RubLog. > > Cheers > Thanks Dave. I'll look into this. Jim -- Jim Freeze ---------- Modern man is the missing link between apes and human beings.