Saves PureBasic source as HTML4.0 strict using CSS styles for syntax highlighting
By David McMinn (dave@blitz-2000.co.uk)
You are free to do anything you want with this source
You use this at your own risk
Suggested use:
Compile to executable and put the exe somewhere (anywhere as long as you remember the path :)
Go to the PureBasic editor config tools item in the Tools menu
Create a new tool with command line \pb2html.exe
Give it arguments (pb2html ) like: "%FILE" "%FILE.html"
Working directory can be anything
Menu name and shortcut can obviously be anything
Other options: Run hidden, Wait until finished, Do not reload
Create a stylesheet with the required styles for SPAN elements with the class names
keyword, comment, string, const and command. Normal text and background are set
by the style for the PRE element of class code. Call the style sheet user_guide.css
and put it in the same directory as your generated HTML. Experienced webmasters can
probably find a more elegant solution.
Limitations
Does not syntax highlight commands, procedures or inline ASM (but then the editor doesn't seem to do any of that here although I know it should)
No configuration of HTML output apart from recompiling the sources
Would be nice to make the "include" commands into links
Fairly unflexible HTML output (well, it was written for one special purpose)
Not optimised in the slightest, would be even worse if it syntax highlighted the commands
Would be nice to be able to read the colours defined in your PureBasic editor preferences
Probably does not validate as HTML4.01 strict
Note
This program serves its purpose for me, I will not be updating it.