RDoc XML

  • Thread starter James Edward Gray II
  • Start date
J

James Edward Gray II

I would like to get a convenient listing of all current Ruby
documentation included in the source. I see that RDoc supports XML
(which would be fine) and I try:

/ruby$ rdoc --all -f xml -n ../ruby_doc.xml

That gives me a lot of date, but it doesn't seem to include the
methods themselves. Is there any way to get them in the XML, or do I
need to build the HTML docs and parse out what I want?

Thanks.

James Edward Gray II
 
E

ES

I would like to get a convenient listing of all current Ruby
documentation included in the source. I see that RDoc supports XML
(which would be fine) and I try:

/ruby$ rdoc --all -f xml -n ../ruby_doc.xml

That gives me a lot of date, but it doesn't seem to include the
methods themselves. Is there any way to get them in the XML, or do I
need to build the HTML docs and parse out what I want?

Not exactly what you requested, but let me offer this anyway:
my rdoc-hacks can normalize RDoc output to a fairly sensible
data format (see spec below) from which an example file can
produce YAML output. It should be able to handle the entire
ruby distribution (at least 1.9 is OK by my testing).

Examples:

http://www.magical-cat.org/projects/ruedoc/examples/yaml/data.yml
http://www.magical-cat.org/projects/ruedoc/examples/ruby-1.9/

Documentation:

http://www.magical-cat.org/projects/ruedoc/rdoc/

Get it from:

http://www.magical-cat.org/projects/ruedoc/downloads/ruedoc-0.1.2.tar.gz


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Normalized data format in YAML:

modules: <as classes>
classes:
-
name: <name of the class>
parent: <parent class>
type: <class or module>
desc: <class description>
files:
-
path: <relative path to file where class defined>

constants:
-
name: <name of the constant>
value: <value of the constant>
desc: <description of the constant>

public_class_methods:
-
name: <method name>
params: <(parameters)>
desc: <description>
source: <source code>
example: <example of calling the method> # C methods only

protected_class_methods: <as above>
private_class_methods: <as above>
public_instance_methods: <as above>
protected_instance_methods: <as above>
private_instance_methods: <as above>

files:
-
name: <filename>
path: <relative path>
desc: <description>
modified: <modification timestamp>
requires:
-
name: <library name>

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Thanks.

James Edward Gray II

E
 
J

James Edward Gray II

my rdoc-hacks can normalize RDoc output to a fairly sensible
data format (see spec below) from which an example file can
produce YAML output.

Thanks, I'll look into it.

I've been looking closely at RDoc's HTML output. I was surprised to
find that it doesn't validate. :( Is the RDoc maintainer aware of
this bug?

James Edward Gray II
 

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


Members online

Forum statistics

Threads
473,780
Messages
2,569,609
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top