Is there something like a documentation creator?

Everything else that doesn't fall into one of the other PB categories.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Is there something like a documentation creator?

Post 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) )
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Is there something like a documentation creator?

Post by ts-soft »

here: http://www.purebasic.fr/english/viewtop ... 85#p152585
but download no more available :(
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: Is there something like a documentation creator?

Post 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
Athlon64 3700+, 1024MB Ram, Radeon X1600
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Is there something like a documentation creator?

Post by c4s »

Thank you Remi! I'll check it out as soon as I have some time...
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Is there something like a documentation creator?

Post 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
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Is there something like a documentation creator?

Post by luis »

Thank you remi_meier and thanks to ts-soft for the update. :wink:
"Have you tried turning it off and on again ?"
remi_meier
Enthusiast
Enthusiast
Posts: 468
Joined: Sat Dec 20, 2003 6:19 pm
Location: Switzerland

Re: Is there something like a documentation creator?

Post 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! :)
Athlon64 3700+, 1024MB Ram, Radeon X1600
Post Reply