rdoc in rails

R

Roeland Moors

Would it be difficult (possible) to make a generator for rdoc that
generates the rdoc in a database format?
The advantage is that you could use rails on this database to
create a search function, some nice views, ...

Just an idea,

Roeland
 
D

David Heinemeier Hansson

Would it be difficult (possible) to make a generator for rdoc that
generates the rdoc in a database format?

I think RDoc already generates the data in YAML, doesn't it? I too
would love to see a Rails application that could import a YAML set of
definitions and provide a php.net-like doc portal with comments and
searching. That would surely be nice.
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain
 
R

Roeland Moors

I think RDoc already generates the data in YAML, doesn't it? I too
would love to see a Rails application that could import a YAML set of
definitions and provide a php.net-like doc portal with comments and
searching. That would surely be nice.

I don't think it generates YAML, but it does generate XML. I'm
trying to adjust the XML generator to a SQL generator. At the
moment it looks like that isn't really a problem...
 
R

Roeland Moors

I don't think it generates YAML, but it does generate XML. I'm
trying to adjust the XML generator to a SQL generator. At the
moment it looks like that isn't really a problem...
I was wrong about the YAML output. The RI generator generates
YAML files.
 
J

James Britt

Roeland said:
I was wrong about the YAML output. The RI generator generates
YAML files.

Question for Dave Thomas (and my apologies if I've asked this before):

How stable is the file format for the ri YAML data?

A few months ago, on a train ride to Munich, I wrote some code that
grabbed ri data and stuffed it into a Madeleine instance, with a
WEBrick front end (probably via Catapult), so that one could get a sort
of ri Web service that spit back ri data in XML.

It got lost in the shuffle of traveling and then working, but I should
go dig it up.

I think one of my concerns was that neither the Ri API nor the YAML file
format was stable, so I wanted some intermediate service that would
reliably emit a known (to me, at least) XML format. Then, if and when
th ri internals changed, I could change the service code, but clients
would be unaffected.

I also started adding in the means for indexing and retrieving ri data
in foreign (i.e.m non-English) languages.

Somewhere on my hard drive ...



Thanks,

James
 
D

Dave Thomas

I was wrong about the YAML output. The RI generator generates
YAML files.

To create YAML directly, you could probably just serialize the
code_object.rb objects.

Cheers


Dave
 
D

Dave Thomas

Question for Dave Thomas (and my apologies if I've asked this before):

How stable is the file format for the ri YAML data?

The file format is YAML. I don't think there've been any incompatible
YAML changes for a while now.

The file content is also pretty stable. There _may_ be a change when
the cache stuff gets unstubbed, but at the worst that'll just add an
extra attribute or two to deserialized objects, which shouldn't affect
your code.

Cheers


Dave
 
J

James Britt

Dave said:
The file format is YAML. I don't think there've been any incompatible
YAML changes for a while now.

The file content is also pretty stable.

That's actually what I meant t say; not if YAML itself is stable, but if
the structure of the YAML in the ri data files is reasonably stable,
such that code that parses the file content directly as strings
shouldn't break too much too soon if there are changes to the ri API.
There _may_ be a change when the
cache stuff gets unstubbed, but at the worst that'll just add an extra
attribute or two to deserialized objects, which shouldn't affect your code.

Sounds good. Thanks!


James
 
R

Roeland Moors

Would it be difficult (possible) to make a generator for rdoc that
generates the rdoc in a database format?
The advantage is that you could use rails on this database to
create a search function, some nice views, ...

I created a 0.0.0.0.0.0.1 version: http://roeland.textdriven.com/
Don't blame me if it explodes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

[ANN] rdoc 2.5 Released 7
[ANN] RDoc 3 6
[ANN] RDoc on Github 3
[ANN] rdoc 3.5.2 Released 0
[ANN] rdoc-tags 1.2 Released 0
[ANN] rdoc 3.1 Released 0
[ANN] RDoc 2.2.0 released 19
Ruby 1.9 and rdoc/usage confusion 0

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top