Descent and gotoapi

Guillaume B. guillaume.b.spam at sympatico.ca
Mon Jan 28 18:06:02 PST 2008


Lars Ivar Igesund wrote:
> 
> I chatted with Ary earlier today - I don't think Descent generated API
> docs can ever be a permanent solution for Tango as we want to be able to
> have it part of the various scripts, both for releases and continously
> updated on server for trunk. For that I hope that someone would tackle
> rebuild to do the same, or for dil to suddenly be complete compiler <g>.
> 
> So maybe gotapi should have higher priority, at least from the above
> perspective.
> 

 Hi,

 Beside D, my other favorite language is Ruby so I've made a little Ruby
script (see attachment) that can parse the Tango HTML documentation and
create a XML file for gotapi. (If there was an HTML parser like Hpricot in
D, I would have done it in D!) But, I have no idea if the XML will be
accepted or not like it is by gotapi. Anyway, it's a good start.

 To use the script, you need Ruby and then you can install Hpricot with "gem
install hpricot". You can then run the Ruby script like this:

ruby TangoDocToXML.rb > TangoDoc.xml

 The XML is big so I won't attach it... but don't run it too often because
it downloads the HTML pages from dsource! It would be better to parse local
documentation but I don't have it...

 Also, there are errors in the HTML file for tango.core.Variant and
tango.util.Convert so they are explicitly excluded by the script.

 Hope this helps!

 Guillaume

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TangoDocToXML.rb
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080128/9f399f47/attachment.ksh>


More information about the Digitalmars-d mailing list