Thursday, March 12, 2009

Using the wiki

I had an email discussion with someone about the FreeDOS Wiki, asking about the "help" pages that show the usage of the different FreeDOS commands. For example, the page for As I mentioned in my other email, the in the wiki was split off from the Spec. It is a reference standard only, not necessarily the command line options that can be used with the actual FreeCOM/

I split off each of the commands from the FreeDOS Spec because too many people assumed the Spec was a single "cheat sheet" that showed how to use each of the commands. And of course, that's not true; the Spec is only a reference standard, what commands must support. Which is why the entry has a simple usage.

But by splitting off each of the commands into its own page, I have set it up so that someone (Fritz? Eric?) can go into the wiki and update the command line data with the actual command line usage. That would make the wiki the obvious place for everyone to get help info, and for the Fasthelp program to pull its documentation (for example, a developer with a Linux desktop could easily script a method to pull all the wiki pages for all the FreeDOS commands, and save them as individual html pages.) The wiki conveniently puts all the content for this in <div id="content"> so would be easy to script. I did something very similar for my blog, but the div name was different (obviously.) Here's my blog example. Behold the power of AWK!

/<div class="post hentry category-/ { blog=1 } /<div/ { if (blog==1) {div++} } { if ( (blog==1) && (div>0) ) {print} } /<\/div/ { if (blog==1) { if (--div == 0) {blog=0} } }

I haven't tested it, but I think if you changed the first line to use <div id="content"> everything would work automatically.

It would be better to maintain some pointer back to the reference version, but I have to leave that to someone else since I am leaving the project in May.

No comments:

Post a Comment