How do I use BBDoc

BlitzMax Forums/BlitzMax Beginners Area/How do I use BBDoc

GW(Posted 2005) [#1]
I've searched around but can't find how I need to format my comments to make autodocs.
Could some post them or point me in the right direction?


GW(Posted 2005) [#2]
Anyone??
C'mon help a guy out!


Bot Builder(Posted 2005) [#3]
simply from observation of the modules:

REM
bbdoc: <description>
returns: <what it returns>
about: <details>
EndRem
Function BLAH(blah)


you can use test and html tags anywhere within the <>


GW(Posted 2005) [#4]
Thank you!


Mirko(Posted 2005) [#5]
Does this also work with normal program code or only when creating blitzmax modules?

Is this a way for documenting my program sourcecode, like when using doxygen for c++ ?


Drago(Posted 2005) [#6]
ok, if you have a file called intro.html, it lets you have info about the module before all the commands, and by putting a .bmx file with the commands name you can have source code with a command.


Mirko(Posted 2005) [#7]
I am sorry. i did't understand that explenation.

If i create a programm with a few functions in my code. i put the rem bbdoc: <...> ... endrem block in front of my functions.

Now how do i force BlitzMax to create a list of all my functions with the corresponding description?


Drago(Posted 2005) [#8]
you need to run from a command prompt:
bmk docmods
bmk syncdocs



Liquid(Posted 2005) [#9]
When i run
bmk docmods

i get the following error:
Unable to read stream: console.bmxDocmods Error


Any help?


Perturbatio(Posted 2005) [#10]
do:
bbdoc docmods
bbdoc syncdocs

or you can create a batch file called builddocs.bat in the bin directory, edit it in notepad and put the following in there:
call bbdoc docmods
call bbdoc syncdocs

then you can either double click it or type builddocs at the command prompt.


Liquid(Posted 2005) [#11]
Using:
bbdoc docmods

I get the error:
Unable to read stream: console.bmx


Perturbatio(Posted 2005) [#12]
rename your console.mod directory temporarily and try again.


Liquid(Posted 2005) [#13]
It works!
What is the problem then??


Perturbatio(Posted 2005) [#14]
console.mod probbly doesn't have source.


Liquid(Posted 2005) [#15]
No it doesn't. It should??


Perturbatio(Posted 2005) [#16]
not necessarily, but bbdoc can't document something without a sourcefile there.
you could create a console.bmx dummy file to avoid having to rename it.


Liquid(Posted 2005) [#17]
But not having the source file (do you have it? not the dummy) when i sync modules remotely shouldn't that make an error?
I can sync modules and docs without any problem.


Perturbatio(Posted 2005) [#18]
console.mod is not a BRL module, it's probably either filax's or the other one that was made.


Liquid(Posted 2005) [#19]
Oh, you're right. It's pub.
But I don't understand one thing. Is it necessary for bbdoc to have the source files of all the modules?


Perturbatio(Posted 2005) [#20]
it's necessary because the bbdoc commands are contained inside the bmx files. You can still distribute precompiled mods but you need to create a .bmx file that contains the doc commands for bbdoc to correctly function.


Liquid(Posted 2005) [#21]
I see... Maybe bbdoc should ignore modules that don't have source files.
Thanks Perturbatio for your help.


Perturbatio(Posted 2005) [#22]
I see... Maybe bbdoc should ignore modules that don't have source files.

ideally.
if Mark ever releases the source then you could change it yourself :)


Warren(Posted 2006) [#23]
Is this stuff possible on OSX? I open my Terminal and navigate to the BlitzMax/bin directory but nothing I see in there is executable to the bash shell.


Dreamora(Posted 2006) [#24]
isn't there a bmk app file?

it should be either there or you could create it from the src


Warren(Posted 2006) [#25]
OK ... wait, I can do:

./bmk

Which doesn't seem to do a whole lot. What's the syntax?

I can also do:

./docmods

Which takes a second to run but doesn't seem to produce any tangible output for my mod.


Yan(Posted 2006) [#26]
Yeah, docmods and syncmods were separated from bmk a while back (docs weren't updated).

Running docmods should generate the documents correctly (docmods now also does a 'syncdocs' by default). You may have to restart the IDE to see them though.


Dreamora(Posted 2006) [#27]
./docmods mymods.somemod

But the code must be correct to work! There is especially one thing often forgotton or done wrong:


rem
  bbdoc: This module
end rem
Module mymods.somemod

...

There must not be a blank line in between the rem block and module or you won't get any docs.

Its assumed that this is part of somemod.bmx which is within mod/mymods.mod/somemod.mod