View previous topic :: View next topic |
Author |
Message |
teqdruid
Joined: 11 May 2004 Posts: 390 Location: UMD
|
Posted: Sun Apr 30, 2006 2:49 pm Post subject: CanDyDoc |
|
|
Kris,
I've noticed that you're playing with CanDyDoc: great!
One thing though: be careful with the filename case. I know Windows ignores case, but Unix doesn't. The test docs in the repos don't work on Unix since buffer.html, conduit.html, and fileconduit.html are all in lower case, but the links in the documentation expect them to be mixed case.
Got any ideas on how to get the method signatures to link to types?
~John |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Sun Apr 30, 2006 11:02 pm Post subject: |
|
|
Thx; I'm just messing around for now.
DMD appears to place all files into a single dir (either a -Dd target, or the current one), which kinda' sucks.
I think we may have to go to a Wiki instead of CandyDoc. Any ideas on how to format DDoc output for Wiki ? |
|
Back to top |
|
|
teqdruid
Joined: 11 May 2004 Posts: 390 Location: UMD
|
Posted: Sun Apr 30, 2006 11:07 pm Post subject: |
|
|
I'd rather use CanDyDoc (or something like it) than a wiki. I'd bet if we could come up with some useful ways to improve ddoc and/or CanDyDoc, we could get those changes made. CanDyDoc already looks very useful, and with just a bit more semantic information from ddoc, it could probably be made to produce all sorts of neat stuff (like inheritance diagrams.)
~John |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Mon May 01, 2006 8:19 am Post subject: Re: CanDyDoc |
|
|
teqdruid wrote: | Got any ideas on how to get the method signatures to link to types? |
For what it's worth, I've noticed that this is a weakness in how ddoc emits doc information to DMD's internal templating engine. You have to use some kind of external processing to break the entire method/member signature down into its constituent parts - essentially parsing them after ddoc is done.
I ran into this problem when I tried getting ddoc to output XML. I wound up having to concoct a rather elaborate XSL processor to handle this output so cross-references were possible.
http://svn.dsource.org/projects/ddl/trunk/ddoc/install/ddoc.xsl (ddoc:digestDecl)
I'd imagine that candydoc would have to do something of the same - parsing the declaration in javascript - to do anything smart with the data generated by ddoc. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Mon May 01, 2006 1:20 pm Post subject: |
|
|
Eric, did you ever get the chance to chat with Walter about all those little gotcha's? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Mon May 01, 2006 3:01 pm Post subject: |
|
|
I fussed around a bit and got CandyDoc to link reasonably into a Wiki. Seems to operate acceptably. Some other folks have been making CandyDoc look even slicker |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Mon May 01, 2006 3:52 pm Post subject: |
|
|
kris wrote: | Eric, did you ever get the chance to chat with Walter about all those little gotcha's? |
Nope.
Aside from the method/member signature issue, were there any other snags that you guys can remember? I'd like to compile a list before I go posting about it in the DNG. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Mon May 01, 2006 4:22 pm Post subject: |
|
|
ctors are not isolated? |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Mon May 01, 2006 5:39 pm Post subject: |
|
|
Can someone perhaps help with a Scripting/HTML problem, please?
I need to construct a URL like this:
Code: | <a href="http://dsource.org/projects/mango/browser/branches/v2/mango/io/Buffer.d">$(TITLE)</a> |
From just the $(title) itself; where the title content is actually "mango.io.Buffer". In other words, the dots need to be converted to slashes, and a prefix and postfix need to be added on the fly.
Presumeably, one would add some script with a couple of arguments? But I've no idea how that might be done
Any ideas? |
|
Back to top |
|
|
John
Joined: 17 Jan 2006 Posts: 75
|
Posted: Tue May 02, 2006 2:29 am Post subject: |
|
|
In the ddoc file, put this script in the DDOC section, between the head tags:
Code: | <script>
function anchorFromTitle(title, path, ext) {
var url = path + title.replace(/\./g, "/") + "." + ext;
document.write("<a href='" + url + "'>" + title + "</a>");
}
</script> |
Then replace the $(TITLE) macro with this:
Code: | <script>anchorFromTitle('$(TITLE)', 'http://dsource.org/projects/mango/browser/branches/v2/', 'd');</script> |
John C. |
|
Back to top |
|
|
kris
Joined: 27 Mar 2004 Posts: 1494 Location: South Pacific
|
Posted: Tue May 02, 2006 10:31 am Post subject: |
|
|
Thank you, very much. That works nicely!
Wrapping the $(TITLE) parameter in quotes is a tad wierd |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Tue May 02, 2006 11:08 am Post subject: |
|
|
kris wrote: | Thank you, very much. That works nicely!
Wrapping the $(TITLE) parameter in quotes is a tad wierd |
Heh, that's nothing. Try programming in ColdFusion sometime. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
|