Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DBdoc - Project Documentor

Author
Message
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2005 22:59 Edited at: 12th Feb 2005 01:06
**** UPDATED 12 Feb 2005 ****
Return Value was not documented in HTML output
Apollo Download link also updated


DBdoc is a documentation tool for DarkBasic Professional. It will create a reference HTML page of your project, settings, include files, functions, parameters, return values and comments. It's open source, I encourage you modify it and hand it back to the community, or myself to provide consolidated updates in the future.



Requirements
Microsoft Word 2000 or above, with security set to allow Macros to run

Instructions
Download the Zip file and extract with folder structure intact.
Load the document, and the form will automatically start
Select your project
Press "Document!". This will create a Treeview of your project, with general information, Include files and functions listed.
To create the HTML output, press export. This will create a subfolder in your project directory call DBdoc, and place your HTML file in this folder. All include files are hyperlinked at the top for quick navigation

Notation
There are various notation marks you must use in your project to get the full benefit:
@P Within a function, markup your parameter descriptions with @P (at the beginning of the line). The remainder of the line will be used in the DBdoc as a parameter description.
@C Within a function, markup your comments with @C (at the beginning of the line). The remainder of the line will be used in the DBdoc as a comment.



Templates
You will find the DBdoc template in the template subfolder. This can be copied and modified to create differently formatted DBdocs. The supplied template is basic, you may wish to enhance it and return it to the community for the benefit of all.

Footnote
This tool was created for my own use, I hope you find it of use. The choice of tool (Microsoft Word) was to allow rapid development, due to the string manipulation involved. Feel free to investigate and edit the code, but don't criticise me for the content. This was an organic project, that grew as necessary.
It has been tested on various projects created using Blue IDE, and is compatible with the output from this editor. No project files are edited, and consequently it is safe to experiment without risk to your source code. However, it is always recommended that you backup your files regularly.

No animals were harmed during the making of this tool

BatVink

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2005 23:01
Screen Shot - DBdoc Form

BatVink

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2005 23:02
Screen Shot - HTML output

BatVink

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2005 23:05
Example - HTML output - download to view sample output from my Compo Entry project. Scrolling down, you will see more comprehensive examples in the ini.dba section, with functions, parameters and comments included.

BatVink

Attachments

Login to view attachments
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 12th Jan 2005 23:11
Awesome idea - one thing that would make it even more awesome is a source tidier. Like maybe it could make fresh copies of your source but with automated indenting. Step 1 of troublesome debugging for me is to always tidy up what I've been working on, especially when dealing with rogue If Then commands for instance. When supplying full source code to an app, an intro page like that could help tremendously.

I have been planning on making a source tidier and analyser for a while now, like something that can find nesting errors and apply a general format to areas, like a row of '-'s inbetween functions can make things much clearer.


Van-B


It's c**p being the only coder in the village.
Kjelle69
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: Sweden 150 km north of arctic circle
Posted: 12th Jan 2005 23:17
I get a compiler error:
Sub or function is not defined.

In this line:
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Jan 2005 23:30 Edited at: 12th Jan 2005 23:31
Missing References
Looks like you haven't got one of the references included for some reason. This is the trouble with MS VBA scripts, not as portable as they should be.

1. Close the form if it is open, using the X button in the top-right.
2. Press [ALT] + F11 to open the VB editor.
3. Select Tools | References from the menus
4. You should see a window like this:

5. Ensure you have selected:
....* Visual Basic for Applications
....* Microsoft Word (x.x) Object library (version may vary)
....* Microsoft Office (x.x) Object Library (version may vary)
....* Microsoft Forms (x.x) Object Library (version may vary)
6. Save, Close and Reopen

BatVink

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jan 2005 05:16
If anyone else has any problems, please let me know and I will attempt to fix.

BatVink
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Feb 2005 07:23
updated, see first post

BatVink
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Feb 2005 11:18
great proggie Vink, wrong forum?

fasdfsdaf
20
Years of Service
User Offline
Joined: 17th Jan 2005
Location:
Posted: 17th Feb 2005 11:31
Is this open source?

www.war3forums.net
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Feb 2005 16:05
Quote: "wrong forum?"

Wasn't sure where to put it, but it only works for DB Pro and it's development related, so I plonked it here.

Quote: "Is this open source?"

Yup. Do with it what you will, but I suggest returning any improvements to the community. And if you return them to me, I will collate them and ensure there is a complete version with all contributions included.

At the moment, it's very basic. I'm sure somebody could do a lot more with it.

BatVink

Login to post a reply

Server time is: 2025-05-28 06:18:45
Your offset time is: 2025-05-28 06:18:45