[Nitro] RDog ping
James Britt
james.britt at gmail.com
Wed Jun 21 14:52:21 EDT 2006
Andrew Thompson wrote:
> On Wed, Jun 21, 2006 at 07:55:09AM -0700, James Britt wrote:
>
>>TRANS wrote:
>>
>>>I like the sound of this Rue project. Is it a complete RDoc
>>>replacement, or does it just mod Roc?
>>
>>It uses the built-in rdoc to drive the Rue template. Normally (I think)
>>the output is a set of HTML pages that use AJAX to fetch and render the
>>API content. Not sure where the YAML is created (perhaps it feeds the
>>sever for delivering content; I've only poked around, not properly run it).
>>
>>But it does include an rdoc template that generates the YAML (again,
>>driven by the built-in rdoc that Dave Thomas wrote).
>>
>
> Rdoc allows you to write new 'generators', it ships with 3; the xml the
> html and the ri ones, anyone can develop more but it's a real pain in
> the ass to do so.
Rue is a template; if I run
rdoc --template 'rue' -1
I get (usually) a slew of data/*.txt files and an HTML page or so that
will use Ajax to render those data files.
If I run
rdoc --template 'rue-yaml' -1 > my-data.yml
I get a big YAML file.
But Rue also includes rdoc-hacks.rb, which mods the default rdoc
behavior (which may be a simpler approach than writing a generator from
scratch).
The YAML emitted by Rue looks much much nicer than the default ri/rdoc
YAML, which embeds object types into the text. The Rue YAML is simply
structure tagged text; you can play with a hash of arrays of hashes (r
arrays ...) and reorganize it as you like.
You can grab Rue here (an unofficial download spot; the actual Ruedoc
project seems to have withered away):
http://www.ruby-doc.org/download/code/ruedoc-0.1.2.tar.gz
One thought was to load in the YAML and hold a custom API data-model in
memory, unnormalized and optimized for searching and commenting.
(Though I wonder if Madeleine might be a fit as well).
And, as with Madeleine, have it back itself up with periodic snapshots,
using Og + Kirbybase or Sqlite.
If the memory footprint isn't too great, it might work as a standalone,
desktop Ruby API server, faster than ri (which is parsing YAML off disk
on every query), with options to add your own notes and comments.
Bundle it up with Nitro+Mongrel, some nice AJAX calls, or whatever.
--
James Britt
"In Ruby, no one cares who your parents were, all they care
about is if you know what you are talking about."
- Logan Capaldo
More information about the Nitro-general
mailing list