ExcelDnaDoc icon indicating copy to clipboard operation
ExcelDnaDoc copied to clipboard

[Question] Usage clarification

Open akasolace opened this issue 1 year ago • 2 comments

Hello @govert ,

I used to have 2 folders /Documentation and /HelpContent useful for Documentation but it seems they can now be removed (at least I haven't notice any side effects). Can you confirm?

Also is there an option to have by default all functions linked to the generated help instead of having manually to put HelpTopic = XXX on each function ? I imagine by default most people want the link to work, instead we could use something like HelpTopic=None if someone wants voluntarily to break the link? What do you think? I could give it a try if you think that is a good idea ...

PS: maybe, in the documentation you could add that Summary tag accept html code ....

akasolace avatar Mar 17 '23 19:03 akasolace

I don't know about /Documentation - I don't see it in my little test project. I think a HelpContent folder under your project directory can override the templates and stuff, and is used when populating HelpContent in the output directory where the html and other files are written. Then these are in turn the input to compile the .chm file. So you can delete the one in the output directory it and it will be rebuilt if needed.

Generating the HelpTopic links automatically would be nice, but I'm not sure how easy it is. We need this information both at compile time, for the help file, and at runtime when registering the functions with Excel. So we need a way to remember the HelpTopic allocations that are made at compile time when the help file is built. One way would be to modify the output assembly during the ExcelDnaDoc build step, using something like Mono.Cecil to rewrite the attribute information. Another option might be to write this information to the .dna file somehow, and use at runtime. Anyway, it seems kind of tricky and needs some thought. How would you approach it? Is it worth the effort?

govert avatar Mar 17 '23 20:03 govert

To be honest I had no idea how to approach it. I naively thought that this could be done manipulating somehow that part of the code https://github.com/Excel-DNA/ExcelDnaDoc/blob/611df5cb5f3fd88b58f4a8b032c23741374d54b2/src/ExcelDnaDoc.Html/Utility/ILInspector.cs#L83

Yesterday, meanwhile I did a quick fix on my side as part of my post-build event to add all missing HelpTopic .....

akasolace avatar Mar 18 '23 10:03 akasolace