[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

RDoc: How to extend; YAML?

Graham Wideman

9/1/2006 8:01:00 PM

Folks:

I'm wanting to extend RDoc to produce module/class/method etc data in an
alternative format.

Looks like the general principle is to add a generator module, and then
command rdoc to use that using the fmt command line parameter.

OK so far, but two questions:

1. Project structure
---------------------
If I want to add an alternative-output extension, what's the right way to
structure my project's files? I could add a generator module in the
directory in the existing library where the library's rdoc looks for it, but
that means adding my mess to the library. Or I could copy the entire
library's rdoc tree to my own space... but copying the library seems wrong.

2. yaml
--------
What currently produces the yaml output that's sitting in:

D:\ruby\share\ri\1.8\system

3. RDoc Docs?
-------------

Are there any good docs on RDoc in general, and extending RDoc specifically
(aside from the source code)? Googling for "RDoc documentation" is not very
satisfying :-).

Thanks,

Graham

--
---------------------------------------------------
Graham Wideman
Microsoft Visio MVP
---------------------------------------------------
Book/Tools:
Visio 2003 Developer's Survival Pack
Resources for programmable diagramming at:
http://www.diagram...


4 Answers

e

9/1/2006 11:25:00 PM

0

Graham Wideman wrote:
> Folks:
>
> I'm wanting to extend RDoc to produce module/class/method etc data in an
> alternative format.
>
> <elided />

I needed to do this a while back and just ended up
hacking directly into the intermediary HTML builder
to intercept the internal data structures from that.
After a bit of normalization, YAML is spat out.

When I get home, I will see if I can get a tarball
hosted somewhere or I can mail it to you.

--
Posted via http://www.ruby-....

James Britt

9/1/2006 11:39:00 PM

0

Eero Saynatkari wrote:
> Graham Wideman wrote:
>
>>Folks:
>>
>>I'm wanting to extend RDoc to produce module/class/method etc data in an
>>alternative format.
>>
>><elided />
>
>
> I needed to do this a while back and just ended up
> hacking directly into the intermediary HTML builder
> to intercept the internal data structures from that.
> After a bit of normalization, YAML is spat out.
>
> When I get home, I will see if I can get a tarball
> hosted somewhere or I can mail it to you.
>

RDog also does rdoc source/outputter manipulation, and may offer some
ideas or examples:

http://rubyforge.org/pro...


--
James Britt

http://www.ru... - Ruby Help & Documentation
http://www.artima.c... - The Journal By & For Rubyists
http://www.rub... - The Ruby Store for Ruby Stuff
http://web2.0val... - We're the Dot in Web 2.0

Eric Hodel

9/2/2006 1:54:00 AM

0

On Sep 1, 2006, at 1:05 PM, Graham Wideman wrote:

> 3. RDoc Docs?
> -------------
>
> Are there any good docs on RDoc in general, and extending RDoc
> specifically
> (aside from the source code)? Googling for "RDoc documentation" is
> not very
> satisfying :-).

Unfortunately, no.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...



Graham Wideman

9/2/2006 2:51:00 AM

0

Eero:

I'm not directly interested in spitting out the yaml, I was interested in
how the ri yaml had been generated since there wasn't an evident yaml rdoc
generator.

As for hacking into the html builder, that's about what I was considering
too.

I intended to add a new generator module, based on one or another of the
existing one. But this led to the question I asked, which was how to
structure such a project in a manner that worked *with* Ruby rather than
against!

BTW, thanks for the offer, but hold off on effort that unless I get really
stuck.

Thanks,

Graham



"Eero Saynatkari" <eero.saynatkari@kolumbus.fi> wrote in message
news:99e482e5bc8af4e1fa896109d3cc0738@ruby-forum.com...
> Graham Wideman wrote:
>> Folks:
>>
>> I'm wanting to extend RDoc to produce module/class/method etc data in an
>> alternative format.
>>
>> <elided />
>
> I needed to do this a while back and just ended up
> hacking directly into the intermediary HTML builder
> to intercept the internal data structures from that.
> After a bit of normalization, YAML is spat out.
>
> When I get home, I will see if I can get a tarball
> hosted somewhere or I can mail it to you.
>
> --
> Posted via http://www.ruby-....
>