Page 1 of 1

Is there something like a documentation creator?

Posted: Sun Nov 11, 2012 12:56 pm
by c4s
OK, lately I found out about some cool stuff other programming languages offer. One of it was an automatic documentation creator.

Most of you might already know what I'm talking about: It parses the source code for special comments (@param, @version, @return etc.) and uses them to generate a basic source documentation e.g. in HTML. A parsable source could look like this:

Code: Select all

;**
; Calculates square number and creates a string of it.
; @param Number The number to calculate with.
; @return Square number as string.
; @version: 1.0, 2012-11-10 09:08:07
;*
Procedure.s SquareStr(Number.i)
	ProcedureReturn Str(Number * Number)
EndProcedure

Debug SquareStr(2)
...Results in e.g.:
Procedures:
- SquareStr()
++ Information:
--- Location: "C:\Test.pb", Line 7-9
--- Body Size: 37 Characters
--- Version: 1.0
--- Date: 10 Nov., 2012
++ Purpose: Calculates square number and creates a string of it.
++ Parameters:
--- Number (integer) - The number to calculate with.
[...]
Now the question: Does such a tool exist for PureBasic? Or is there anything more general which I could configure to parse PB code?


(P.S. If anyone comes up with "just use language XYZ which is way better than PB and already has all you need": Well thanks for the suggestion, but I want to stay with PureBasic that's why I'm posting here... 8) )

Re: Is there something like a documentation creator?

Posted: Sun Nov 11, 2012 1:14 pm
by ts-soft
here: http://www.purebasic.fr/english/viewtop ... 85#p152585
but download no more available :(

Re: Is there something like a documentation creator?

Posted: Mon Nov 12, 2012 7:38 pm
by remi_meier
Here is the source as it was last compiled:
http://remi.secretly.de/downloads/jaPBDoc.zip

It might need some updates (e.g. keywords since PB 4.10)
or it might just work. Maybe it is still useful but I cannot
work on it currently.

Cheers!
Remi

Re: Is there something like a documentation creator?

Posted: Mon Nov 12, 2012 10:06 pm
by c4s
Thank you Remi! I'll check it out as soon as I have some time...

Re: Is there something like a documentation creator?

Posted: Mon Nov 12, 2012 11:25 pm
by ts-soft
Thx Remi :D

I have updated your version to support PB5.00 and x64
I have added a windows executable and run.bat for windows user.

Download: https://dl.dropbox.com/u/3086026/jaPBDoc.zip

Re: Is there something like a documentation creator?

Posted: Mon Nov 12, 2012 11:33 pm
by luis
Thank you remi_meier and thanks to ts-soft for the update. :wink:

Re: Is there something like a documentation creator?

Posted: Tue Nov 13, 2012 12:14 pm
by remi_meier
ts-soft wrote:Thx Remi :D

I have updated your version to support PB5.00 and x64
I have added a windows executable and run.bat for windows user.

Download: https://dl.dropbox.com/u/3086026/jaPBDoc.zip
Cool! :)