FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CanDyDoc

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Sun Apr 30, 2006 2:49 pm    Post subject: CanDyDoc Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun Apr 30, 2006 11:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
teqdruid



Joined: 11 May 2004
Posts: 390
Location: UMD

PostPosted: Sun Apr 30, 2006 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon May 01, 2006 8:19 am    Post subject: Re: CanDyDoc Reply with quote

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
View user's profile Send private message Yahoo Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon May 01, 2006 1:20 pm    Post subject: Reply with quote

Eric, did you ever get the chance to chat with Walter about all those little gotcha's?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon May 01, 2006 3:01 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Mon May 01, 2006 3:52 pm    Post subject: Reply with quote

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. Smile
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon May 01, 2006 4:22 pm    Post subject: Reply with quote

ctors are not isolated?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon May 01, 2006 5:39 pm    Post subject: Reply with quote

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 Embarassed

Any ideas?
Back to top
View user's profile Send private message
John



Joined: 17 Jan 2006
Posts: 75

PostPosted: Tue May 02, 2006 2:29 am    Post subject: Reply with quote

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
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue May 02, 2006 10:31 am    Post subject: Reply with quote

Thank you, very much. That works nicely!

Wrapping the $(TITLE) parameter in quotes is a tad wierd Smile
Back to top
View user's profile Send private message
pragma



Joined: 28 May 2004
Posts: 607
Location: Washington, DC

PostPosted: Tue May 02, 2006 11:08 am    Post subject: Reply with quote

kris wrote:
Thank you, very much. That works nicely!

Wrapping the $(TITLE) parameter in quotes is a tad wierd Smile


Heh, that's nothing. Try programming in ColdFusion sometime. Sad
_________________
-- !Eric.t.Anderton at gmail
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group