json and ddoc

Brad Anderson eco at gnuk.net
Wed Aug 1 10:51:47 PDT 2012


On Wed, Aug 1, 2012 at 8:07 AM, Adam D. Ruppe <destructionator at gmail.com>wrote:

> I'm (finally) updating my dpldocs.info website again, and
> before I just pulled names from the generated Phobos html.
>
> This time, I want to use dmd's json output to avoid dependency
> on the specific html layout of std.ddoc.
>
>
> Anyway I hit dmd -c -X -D *.d in the phobos dir. Boom, I got
> one big .json file with all the info.
>
> But, the comments aren't parsed at all.
>
>
>
> So, my question is: do we have a ddoc parser that stands alone?
>
>
> BTW: this is the complete listing from json so far:
> http://dpldocs.info/search/**awesome <http://dpldocs.info/search/awesome>
>
> I'm actually impressed with the speed, considering it is re-parsing
> 3 MB of generated json per load. std.variant and std.json might not
> be speed demons, but they are plenty good enough for me.
>
> The ultimate goal here is to revitalize my D search engine and to
> make it as a nice index for all functions, with brief descriptions,
> etc., hopefully for all D libs everywhere.
>
> With the html, dealing with different people's macros to parse it
> is a pain. But with the json, dmd always does it the same way, so
> with some luck, I can just add a box "upload your project's json
> file" and allow easy instant submissions for other libs.
>

There is already a pull request to add (at least some) ddoc to json:

http://forum.dlang.org/post/ycfyhcsbciguzaxwuppv@forum.dlang.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120801/1a9d288a/attachment-0001.html>


More information about the Digitalmars-d mailing list