makedocs tweak

BlitzMax Forums/BlitzMax Module Tweaks/makedocs tweak

markcw(Posted 2010) [#1]
I am redistributing binaries of makedocs and docmods so it's easy for the community to test them out.

I have only win32 and linux zips and I will get ppcmac later but I don't have an imac, so that's out unless someone wants to help.

Extract both files to your 'bin' folder.
makedocs-win32.zip (expired)
makedocs-linux.zip (expired)

All changes should be cross platform. If you know any bugs I've missed (or created) please point them out!

New docmods features, most changes are designed to reflect makedocs:
- added escape character parsing for '~#', '~@', '~%', '~|' and '~~'
- removed full stops added to end of paragraphs, single line docs are better without one
- added '#' links, for example '#brl.basic', '#Print', '#{User guide}', '#bah.regex', etc
- added '{{' and '}}' for <pre> tags and removed '&' for <pre> as it's not supported in makedocs
- added '[', ']' and '*' for <ul> and <li> bullets, if '|' found then it's a table with '*' for <tr> and '|' for <td>
- added '+' for <h1> header tags, in intro.bbdoc the first '+' is <h1>thereafter it is <h2>
- removed module description printing as header in introduction
- added navbar for types instead of just type headers
- fixed example links not working if filename in lowercase
- changed type summary tables width from 90% to 95%, all type tables are now 95%
- more robust parsing of bbdoc rem tags, about: doesn't have to be last
- added 'param:' bbdoc rem tag, limited to one line but multiple entries are supported
- some other minor fixes

Not many makedocs features yet (but more soon):
- html links to all third party modules in the modules section, no need to use the sidebar
- 'Rem bbdoc:' on same line for 2 line descriptions
- fixed loading example files for type subfolders

Last edits: 27 Aug 2010.

I found this bug when I was updating the brl.linkedlist docs.

In fredborgstyle.bmx a LoadText would crash if it didn't find an example file in a type subfolder.

Source file (from v 1.41) and the patch.

fredborgstyle.diff


fredborgstyle.bmx



markcw(Posted 2010) [#2]
This fixes links that redirect to the type identifier with the same name as a standard identifier.
For examples try clicking PeekByte in brl.bank or ReadByte in brl.stream.

In docstyle.bmx the link gets overridden by a type identifier link of the same name.
The fix isolates the right sort of link in the 'Else If' block and then if a '#' is found it strips off the type subfolder name.

Source file (from v 1.41) and the patch.

docstyle.diff


docstyle.bmx



markcw(Posted 2010) [#3]
This is a few fixes and new features for makedocs.

Changes so far are:
- html links to all third party modules in the modules section, no need to use the sidebar
- 'Rem bbdoc:' on same line for 2 line descriptions
- fixed loading example files for type subfolders

Source file (from v 1.41) and the patch.

makedocs.diff


makedocs.bmx



markcw(Posted 2010) [#4]
This is lots of bug fixes and new features for docmods via docparser.bmx.

Changes include:
- added escape character parsing for '~#', '~@', '~%', '~|' and '~~'
- removed full stops added to end of paragraphs, single line docs are better without one
- added '#' links, for example '#brl.basic', '#Print', '#{User guide}', '#bah.regex', etc
- added '{{' and '}}' for <pre> tags and removed '&' for <pre> as it's not supported in makedocs
- added '[', ']' and '*' for <ul> and <li> bullets, if '|' found then it's a table with '*' for <tr> and '|' for <td>
- added '+' for <h1> header tags, in intro.bbdoc the first '+' is <h1>thereafter it is <h2>
- removed module description printing as header in introduction
- added navbar for types instead of just type headers
- fixed example links not working if filename in lowercase
- changed type summary tables width from 90% to 95%, all type tables are now 95%
- more robust parsing of bbdoc rem tags, about: doesn't have to be last
- added 'param:' bbdoc rem tag, limited to one line but multiple entries are supported
- some other minor fixes

Source file (from v 1.41) and the patch.

docparser.diff


docparser.bmx



markcw(Posted 2010) [#5]
This is a tweak I posted a few months ago for makedocs and docmods but I've just updated it and moved it here so my changes are all in one place.

As a result of this thread I added support for Rem and bbdoc: entries on the same line ie. so you can do this:
Rem bbdoc: my two line description
EndRem

As far as I know it works fine and doesn't break anything. It's not an essential feature by any means but it's nice to have as an option for consts and globals.

I have applied the makedocs.bmx patch that used to be here (see above post #3 @lines -138 +152) as it was too complicated to have multiple patches for the same file.

So the docmods source (from v 1.41) and patch.

bmxtoker.diff


bmxtoker.bmx



degac(Posted 2010) [#6]
Big work, thanks!

Why dont' you make a .zip file with the latest version of bmxtoker.bmx, makedocs.bmx etc?


markcw(Posted 2010) [#7]
Grazie degac!

I would but I thought that everything in BlitzMax/src is under the BSSC license, although it doesn't say so I'm not sure.


markcw(Posted 2010) [#8]
This adds a function in docmods to create html links to all third party modules in the modules section.

Source file (from v 1.41) and patch.

docmods.diff


docmods.bmx



Brucey(Posted 2015) [#9]
Always nice to resurrect 5 year old zombie posts :-p

Just a couple of questions, Mister Mcvi...

* Is this patch-work compatible with the latest 1.50 code?
* I'm sure you had something for lifting code examples from the forum manual, but I appear to have misplaced the link. Does it install them into the documentation ?

Thanks!

:o)


markcw(Posted 2015) [#10]
No and yes.

The doc examples code is HERE.

I'll have a look and see if this needs an update.


markcw(Posted 2015) [#11]
I thought it would be no but I ran a diff on src/makedocs 1.41 v 1.50 and they're identical. So, yes then.