[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RedCloth, BlueCloth...

Hal E. Fulton

4/15/2005 12:32:00 AM

...OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
here in town.)

I want to know what's the best way to manage a file that has
both text and HTML versions. (Yes, I'm talking about the
comp.lang.ruby FAQ, which should autopost tomorrow.)

In the past, I've done this the worst possible way -- keeping
them manually in sync. I've also done some playing with
textual browsers and such.

What's a good/easy way to do this? Lynx, links? RedCloth,
BlueCloth, PlaidCloth? MarkDown, MarkUp, MarkTwain?


Thanks,
Hal



18 Answers

zhekov

4/15/2005 12:47:00 AM

0

> What's a good/easy way to do this? Lynx, links? RedCloth,
> BlueCloth, PlaidCloth? MarkDown, MarkUp, MarkTwain?

Markdown and Textile are standarts, RedCloth and BlueCloth -
implementations.

RedCloth is the way i think - it give you support for Markdown,
Textile + mix of both. Just decide which markup you like.
From somebody's post: "Markdown is for emails, textile
- for the web". In general: textile, implemented with RedCloth
is my opinion.

Or just go with some text to html convertor:
- [ http://txt2html.source... ]
- [ http://www.methods.co.nz/asciidoc/... ]



james_b

4/15/2005 12:58:00 AM

0

Hal Fulton wrote:
> ...OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> here in town.)

That's OK; when I read the subject line, I filled in the rest of it with
" ... 1 2 3!"
>
> I want to know what's the best way to manage a file that has
> both text and HTML versions. (Yes, I'm talking about the
> comp.lang.ruby FAQ, which should autopost tomorrow.)
>
> In the past, I've done this the worst possible way -- keeping
> them manually in sync. I've also done some playing with
> textual browsers and such.
>
> What's a good/easy way to do this? Lynx, links? RedCloth,
> BlueCloth, PlaidCloth? MarkDown, MarkUp, MarkTwain?

Once upon a time I had a similar issue with the ruby-doc weekly news
summary. I wanted an RSS feed, an E-mail posting, and something else I
cannot recall.

This may have been before Textile/Markdown, but I used something along
those lines. I wrote a small app that grabbed a single input file and
ran it through assorted transformers to produce the .eml file, the RSS,
and whatever else.

Textile is quite nice for generating HTML; Markdown is handy because it
is ready-made for plain-text E-mail.

I would opt for Markdown here, though, as it can go straight to
ruby-talk as-is.



James


Tom Copeland

4/15/2005 2:14:00 AM

0

On Fri, 2005-04-15 at 09:31 +0900, Hal Fulton wrote:
> ...OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> here in town.)

Try them, try them, you will see!

Tom, who has read Green Eggs and Ham many, many times.




Bill Guindon

4/15/2005 2:38:00 AM

0

On 4/14/05, Tom Copeland <tom@infoether.com> wrote:
> On Fri, 2005-04-15 at 09:31 +0900, Hal Fulton wrote:
> > ...OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> > here in town.)
>
> Try them, try them, you will see!
>
> Tom, who has read Green Eggs and Ham many, many times.
>

I will not merge text and HTML
I will not merge them so said Hal
I will not merge them in a file
I will not merge them in a pile
I will not merge them on your desk
I will not merge them within Plesk
I will not merge them in email
if I tried, I'd surely fail

I wonder what "Suess, the new programming language" would look like.

--
Bill Guindon (aka aGorilla)



David Mitchell

4/15/2005 5:49:00 AM

0

On Fri, 15 Apr 2005 09:31:59 +0900, Hal Fulton wrote:

> ..OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> here in town.)
>
> I want to know what's the best way to manage a file that has
> both text and HTML versions. (Yes, I'm talking about the
> comp.lang.ruby FAQ, which should autopost tomorrow.)

I realise this is the Ruby newsgroup and it's the Ruby FAQ you're talking
about, but you could maintain a single XML-based version and use XSLT to
extract both text and HTML (and just about any other format you care to
mention) using tools that are on every modern Windows PC or Linux system.

Downside - no Ruby required...

Mark Hubbart

4/15/2005 6:33:00 AM

0

On 4/14/05, David Mitchell <monch1962@gmail.com> wrote:
> On Fri, 15 Apr 2005 09:31:59 +0900, Hal Fulton wrote:
>
> > ..OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> > here in town.)
> >
> > I want to know what's the best way to manage a file that has
> > both text and HTML versions. (Yes, I'm talking about the
> > comp.lang.ruby FAQ, which should autopost tomorrow.)
>
> I realise this is the Ruby newsgroup and it's the Ruby FAQ you're talking
> about, but you could maintain a single XML-based version and use XSLT to
> extract both text and HTML (and just about any other format you care to
> mention) using tools that are on every modern Windows PC or Linux system.

ow ow ow. Maybe it's just me, but maintaining a large document like
the FAQ in xml seems masochistic, when there are nice human readable
formats like markdown or textile around.

> Downside - no Ruby required...

Actually, I suspect the tools for markdown and textile are more widely
available than you think. I know that if I was handed an xml/xslt
combo doc, and a markdown doc, I'd have a much better idea of what to
do with the markdown one. And I could do it in Ruby, Perl, Python,
PHP, or even paste it into a web form, to get the html out.

cheers,
Mark



Lyndon Samson

4/15/2005 7:32:00 AM

0

On 4/15/05, Mark Hubbart <discordantus@gmail.com> wrote:
> On 4/14/05, David Mitchell <monch1962@gmail.com> wrote:
> > On Fri, 15 Apr 2005 09:31:59 +0900, Hal Fulton wrote:
> >
> > > ..OldCloth, NewCloth? (Sorry, I went to a Dr. Seuss exhibit
> > > here in town.)
> > >
> > > I want to know what's the best way to manage a file that has
> > > both text and HTML versions. (Yes, I'm talking about the
> > > comp.lang.ruby FAQ, which should autopost tomorrow.)
> >
> > I realise this is the Ruby newsgroup and it's the Ruby FAQ you're talking
> > about, but you could maintain a single XML-based version and use XSLT to
> > extract both text and HTML (and just about any other format you care to
> > mention) using tools that are on every modern Windows PC or Linux system.
>
> ow ow ow. Maybe it's just me, but maintaining a large document like
> the FAQ in xml seems masochistic, when there are nice human readable
> formats like markdown or textile around.
>
> > Downside - no Ruby required...
>
> Actually, I suspect the tools for markdown and textile are more widely
> available than you think. I know that if I was handed an xml/xslt
> combo doc, and a markdown doc, I'd have a much better idea of what to
> do with the markdown one. And I could do it in Ruby, Perl, Python,
> PHP, or even paste it into a web form, to get the html out.
>
> cheers,
> Mark
>
>
<faq>
<contact>
</contact>
<questions>
<question>
<asked>Why is ruby sooo nice?</asked>
<answered>PoLS</answered>
<question>
<questions>
</faq>

Looks pretty neat to me, and maintainable, and you can do all sorts of
re-organisation/filtering ( with XSLT ) and querying (XPath/XQuery et
al) as well. Plenty of GUI/Web tools to let you view/edit as a tree if
you are that way inclined otherwise VIM and Emacs have support for XML
editing.




--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.



Mike Woodhouse

4/15/2005 9:12:00 AM

0

....and I could do it in Ruby
and I could do it in PHP
and with Perl on
and with Python
and I would code them up in C
they are so good, so good you see

I was reading GE&H with my 4 year-old last night...

Mike

*oops

David Mitchell

4/15/2005 9:59:00 AM

0

On Fri, 15 Apr 2005 15:33:03 +0900, Mark Hubbart wrote:


> ow ow ow. Maybe it's just me, but maintaining a large document like
> the FAQ in xml seems masochistic, when there are nice human readable
> formats like markdown or textile around.
>

Bit of finger dyslexia...

The bit I thought I typed, but obviously didn't, is that you can generate
and maintain XML using a nice friendly tool like OpenOffice. Load the FAQ
into OpenOffice, edit it, save it in OpenOffice's native format.

Then write a (Ruby?) script to unzip (gunzip?) the OpenOffice file into
the underlying XML format, run XSLT over it and you've got your ASCII
text, HTML, whatever equivalent document.

Reading my earlier post, my brain just must have turned off at some point
because what I set out to write is nothing like what actually came out of
my fingers. Friday night here, so that's probably the explanation.

Dave M.

Florian Groß

4/15/2005 12:53:00 PM

0

Hal Fulton wrote:

> I want to know what's the best way to manage a file that has
> both text and HTML versions. (Yes, I'm talking about the
> comp.lang.ruby FAQ, which should autopost tomorrow.)
>
> In the past, I've done this the worst possible way -- keeping
> them manually in sync. I've also done some playing with
> textual browsers and such.
>
> What's a good/easy way to do this? Lynx, links? RedCloth,
> BlueCloth, PlaidCloth? MarkDown, MarkUp, MarkTwain?

I'd go with MarkDown through BlueCloth here (though RedCloth recently
seems to have learned bits of that markup as well), but you could in
theory as well go back from the HTML to plain text via lynx --dump or
just go from HTML to MarkDown via http://www.aaronsw.com/2002/...