Does anyone know of a tool / freeware / code theyve written to parse a piece
of VBScript and format it as HTML. I would like to output code snippets onto
a web site / blog that is correctly formatted and with the right colours.

If someone has an xsl sheet or some other method of doing this it would save
me a lot of time.

Re: Displaying code as html by McKirahan

McKirahan
Tue Apr 03 08:53:47 CDT 2007

"Robert" <Robert@discussions.microsoft.com> wrote in message
news:D93879CF-2095-4E23-8939-D58D384737B0@microsoft.com...
> Does anyone know of a tool / freeware / code theyve written to parse a
piece
> of VBScript and format it as HTML. I would like to output code snippets
onto
> a web site / blog that is correctly formatted and with the right colours.
>
> If someone has an xsl sheet or some other method of doing this it would
save
> me a lot of time.

Placing snippets between <pre> and </pre> tags may be sufficient.

Perhaps if you provide an example of what result you want.

Also, define "the right colours".



Re: Displaying code as html by Robert

Robert
Tue Apr 03 09:46:01 CDT 2007

Yes a very good point, the colours I suppose i mean are blue for keyword,
green for comment etc.. the default vb/asp/vbscript dev environment colours,
but I guess if you had an xsl sheet you could change that.


"McKirahan" wrote:

> "Robert" <Robert@discussions.microsoft.com> wrote in message
> news:D93879CF-2095-4E23-8939-D58D384737B0@microsoft.com...
> > Does anyone know of a tool / freeware / code theyve written to parse a
> piece
> > of VBScript and format it as HTML. I would like to output code snippets
> onto
> > a web site / blog that is correctly formatted and with the right colours.
> >
> > If someone has an xsl sheet or some other method of doing this it would
> save
> > me a lot of time.
>
> Placing snippets between <pre> and </pre> tags may be sufficient.
>
> Perhaps if you provide an example of what result you want.
>
> Also, define "the right colours".
>
>
>

Re: Displaying code as html by Michael

Michael
Tue Apr 03 18:37:43 CDT 2007

Robert wrote:
> Does anyone know of a tool / freeware / code theyve written to parse
> a piece of VBScript and format it as HTML. I would like to output
> code snippets onto a web site / blog that is correctly formatted and
> with the right colours.
>
> If someone has an xsl sheet or some other method of doing this it
> would save me a lot of time.

Many of the script aware editors (freeware or low cost) have that sort of
feature to export as RTF or HTML or copy to the clipboard as HTML.

I know that CONText and PSPad (free) both have the export feature and and
EditPlus has a copy as HTML feature (~$30US when I bought it). I'm sure
many more out there do too...


--
Michael Harris
Microsoft.MVP.Scripting



Re: Displaying code as html by JussiJ

JussiJ
Tue Apr 03 19:13:31 CDT 2007

On Apr 3, 11:54 pm, "McKirahan" <N...@McKirahan.com> wrote:
> "Robert" <Rob...@discussions.microsoft.com> wrote in message
>
> news:D93879CF-2095-4E23-8939-D58D384737B0@microsoft.com...
>
> > Does anyone know of a tool / freeware / code theyve written
> > to parse a piece of VBScript and format it as HTML.
>
> Also, define "the right colours".

I think by colours he means the syntax highlighting is shown
in the resulting HTML page.

The Zeus editor does exactly this for c/c++ code:

http://www.zeusedit.com

For VBScript this Zeus feature will produce a HTML file but
the syntax highlight colours are not produced.

But the Web C Plus Plus claims to handle basic files:

http://www.zeusedit.com/forum/viewtopic.php?t=1063

so this might work for VB Script.

Jussi Jumppanen
Author: Zeus for Windows IDE


Re: Displaying code as html by mr_unreliable

mr_unreliable
Tue Apr 03 21:01:08 CDT 2007

hi Robert,

If you don't mind using a 3rd-party control (Nathan's) Code Max
will do the job.

http://www.download.com/CodeMax/3000-2352_4-10284778.html

Code Max has been used by several "syntax-highlighting" editors,
i.e., it is the part of the editor that does the syntax-
hightlighting.

This approach differs from those proposed above. In those cases,
you create a "fixed" html, and then display it.

With Code Max, you give it code, and you get a colorized rendering
of the code "on-the-fly". That is, there is no html, other than
the page used to host the codemax control. The control displays
the syntax-highlighted code that you give it.

For a more modern version of pretty-much the same thing, take a
look at "scintilla":

http://scintilla.sourceforge.net/index.html

Scintilla is the basis for SCiTE, another syntax-highlighting
code editor, much preferred by our friends over at AutoIt.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but,
no guarantee the answers will be applicable to the questions)



Robert wrote:
> Does anyone know of a tool / freeware / code theyve written to parse a piece
> of VBScript and format it as HTML. I would like to output code snippets onto
> a web site / blog that is correctly formatted and with the right colours.
>
> If someone has an xsl sheet or some other method of doing this it would save
> me a lot of time.