Lately I’ve been working on a small project called TheLastRipper, hosted on Code.google.com. A few days ago I started wondering about how to document a Mono/.Net application, not because there’s much to document in TheLastRipper or worth documenting for that matter. Anyway I ended up looking at some pages in the Mono wiki, it seams the best way of generating documentation, wasn’t by using documentations comments handled by the C# compilers /doc argument. This is the method most (former) Windows developers are familiar with, once documentation comments have been exported to Xml by the C# compiler, it can be generate into a CHM file using programs like ndoc. Instead the Mono project generates documentation from binaries, which gives them Xml files containing all methods, classes etc. Later on you’ll then be able to fill out the empty comments. This way documentation of code development have been completely separated.
You can read the discussion between the two different documentation formats in Mono wiki. I’ve chosen a middle path, by exporting my current documentation comments to monodoc. I won’t discuss the process of documenting an application using monodoc, the process is already well documented in the Mono wiki article I’ve linked to a few times. What I will discuss is how to parse you monodoc Xml to WikiMarkup that can be hosted on GoogleCode. Mono already comes with an application to parse monodoc to plain html, called monodocs2html. I’ve made a modification of the application, resulting in monodocs2wiki. If you have your documentation as monodoc Xml you can parse it to WikiMarkup, by doing following:
- Download: monodocs2wiki
- Extract the
- Checkout the /wiki/ directory from your GoogleCode svn repository
- Run: ./monodocs2wiki -source:./docs/ -dest:./wiki/
Where ./docs/ is the base path of your monodoc xml files (Containing an index.xml file). And ./wiki/ is the /wiki/ directory you checked out of svn.
- Commit your /wiki/ directory to svn, and view you documentation in you GoogleCode wiki.
The /wiki/ directory of your GoogleCode svn repository, contains all the pages in your GoogleCode wiki. You may wish to change a few things in the template, perhaps using a different label than just Documentation. Take a look in the README file if you what to know more about customization. The current template in the monodocs2wiki application, uses the markup used in the wikies at Google Code. You may modify it, I think it would be easy to port it to another WikiMarkup. Any questions, feel free to leave a comment or mail me…