Natural Docs Wizard






4.69/5 (11 votes)
Sep 30, 2004
3 min read

42631

804
A small wizard application to create and edit Natural Docs batch files.
Introduction
I just recently began programming in C++ (VB.NET is my is how I earn my wages) and have taken a stab at writing some small classes and programs. Being one who likes to share, I think it's a good idea to include some documentation with the programs that you share online, so people have some idea of what is going on in your code without having to pick it apart piece by piece.
I asked some folks in the programming community what the best documentation software was for C++, and of course, I got a lot of answers. But the two most popular packages were DoxyGen and Natural Docs. Both are excellent products, but I happened to like the style of Natural Doc's comment syntax, and so I chose to try that out first.
The Problem
Natural Docs makes commenting your code very easy and natural. But in order to run Natural Docs, you need to first create a batch file (unless you're a sucker for punishment) to run the program with all of its required paths and options. DoxyGen requires the same thing, but has a nice little wizard to do the dirty work for you. I know the author of Natural Docs is hard at work expanding the program's features, and probably hasn't had time to get around to doing this kind of stuff yet, so I just rolled my own.
The Solution
Natural Docs Wizard is a simple GUI to create, edit, and save Natural Docs batch files. It includes all the possible options as of Natural Docs v1.22, including the ability to have multiple input and output files and formats. It can read batch files written in either shorthand or longhand option notation (i.e., -i or --input or --source). You can specify your own *.css files as well - anything in the /Styles folder will be read by the program and offered up for your use. Tool tips have been used to death in the program in order to give you an idea of what options do what, in case you forgot. Overall, the program is very self explanatory, and will always show you a "live" copy of the batch file as you work. You can choose to run the batch file right from the wizard.
A Few Comments
I included both the executable and the source code downloads above. All you need is the executable, which should be run from your Natural Docs folder. If it is not run from the Natural Docs folder, the program will prompt you to input the location of the /Styles folder (although it remembers where that is, afterwards).
The wizard was pretty much thrown together in an evening, and as such, there are no comments in the source code. I apologize for that, however, this being a free tool, I'm not really attempting to teach anyone anything. Besides, the tool isn't rocket science. If I get a chance, I'll comment the code. Until then, just a few minutes of perusing the code should make its operation clear.
By supplying the source code, you should be able to update the wizard for any new versions that are released (if I don't). Be aware that the code is in VB.NET, so you need the .NET framework in order to run the program. Perhaps, some enterprising person will take the time to make a more platform independent version.
Oh, one more quick note - this is mentioned in the Natural Docs documentation, but I feel it bears repeating here - you should either add the Natural Docs folder to your PATH, or run the batch files from the Natural Docs folder. Otherwise, the NaturalDocs.bat file won't be found.