Doc Generation.....

BlitzMax Forums/BlitzMax Programming/Doc Generation.....

Paul "Taiphoz"(Posted 2011) [#1]
I recall ages ago, god talking years now writing a Doc Gen for Blitz 3D, sods law not minutes after doing it some one else actually release one that was better with more features, the sods lol.

My code is getting a bit large again and being Dyslexic good docs are a must, currently im paper heavy but I have already started to comment my code with writing a document generator in mind, just wondering if anyone else has done one since the last time I checked which woulda have been a few years ago now.

Would like to not code tons of work only to find out there is one out there already :)


Yasha(Posted 2011) [#2]
...did you mean to post this in the B3D forum?

Anyway, Blitz3D has a documentation generator in the Samples, courtesy of Warpy. Don't know if it's especially good (given the source, I would assume so, but I haven't really tested it), but it is definitely there. I was thinking of writing one of these myself, actually. As with so many things, never got around to it.

Another good option might be to just take the BlitzMax one and modify it slightly to work on Blitz3D code (I assume a small number of changes are necessary, but that it shouldn't be many).

Last edited 2011


Paul "Taiphoz"(Posted 2011) [#3]
Nah yeah , the code(which I started lol) is to comment max and monkey source and out put nice looking easily navigated html.


Paul "Taiphoz"(Posted 2011) [#4]
its gona be messy as hell in terms of code, lots of left right and mid$ calls to chup up a line into chunks I can work with, suck out paramaters and comments etc.

My plan is to have a standard way to head a file, head a function/method/type I actually setup a keybind for it in my G15, so I smack 1 key and it does this.

Rem ***********************************************************

Project		:- 
Author		:- 
Website		:- 

Team -
	Art			:- 
	Audio		:- 
	Code		:- 
				
Beta Testers :-
			
Comment :- Application CLI, To parse Blitz Max Code, And produce 
Html Documentation from the parsed code.

End Rem'*******************************************************


so that will be at the top of each max or monkey file.

and then one of these above any function method etc.

Rem'***********************************************************

Structure : -
Name : -
Param ()
Comments ()
Returns ()
Edits ()

End Rem '******************************************************


My flow looks like this.

Check for header, if found advance if not insert a blank header.
Parse all functions, check for function header, if found parse it, if not parse the function and create a header for it.
** Same for Methods, Types, Class's

Once I have parsed the file, have a full list of all functions, methods, class's what they take and what they return, what their comments are etc, I will output it all to a file, html which I will also link from the main index file which will also be created.

In the end it should produce really nice CCS styled documentation, and if you aint commented your code it will lay out templates for all your code so you just need to fill in the blanks.

BLAH. but hay, its nearly 7am and I aint been to sleep yet, so after a sleep what i have so far could turn out to be utter crap HAHAH.


Yasha(Posted 2011) [#5]
If you're doing this for BlitzMax, you are aware that it comes with not one but two documentation generators, right?

Look in BlitzMax/src/docmods (the obsolete one) and BlitzMax/src/makedocs. Makedocs has a readme, which might be helpful.


Paul "Taiphoz"(Posted 2011) [#6]
yeah i knew they were there just assumed they didnt come with source, and I want to do some specific things with the generated document that those wont do.


Paul "Taiphoz"(Posted 2011) [#7]
oh with source i c. might just hack that then to make it do what I want , will have a look still might be worth my while creating my own code tho.


Zeke(Posted 2011) [#8]
Check HotDocs: http://www.hotdocs.de.vu/


col(Posted 2011) [#9]
@Zeke
Wow, thats a handy tool and produces a nice looking output too :P

Thanks for posting that.


Paul "Taiphoz"(Posted 2011) [#10]
I'm probably wrong but does hotdocs not just doc the modules ?