Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

tool to convert java code to HTML for wiki

Thread view: 
usenetjb - 07 Jan 2006 03:29 GMT
anyone know of a tool that will take java code and format it into html.  
think wiki for developers, so they need to be able to read the code
snippets in a readable format in the wiki (mediawiki)

thx
Roedy Green - 07 Jan 2006 04:11 GMT
On Sat, 07 Jan 2006 03:29:55 GMT, usenetjb
<usenet.20.jimbo-black@antichef.net> wrote, quoted or indirectly
quoted someone who said :

>anyone know of a tool that will take java code and format it into html.  
>think wiki for developers, so they need to be able to read the code
>snippets in a readable format in the wiki (mediawiki)

I do all the time.  I render small bits of Java into HTML and longer
files into compressed serialised token files rendered by an Applet
that scrolls them.

See http://mindprod.com/jgloss/jdisplay.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrey Kuznetsov - 07 Jan 2006 04:14 GMT
> anyone know of a tool that will take java code and format it into html.
http://www.google.de/search?hl=de&q=java2html&btnG=Google-Suche&meta=

Signature

Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Hal Rosser - 07 Jan 2006 05:34 GMT
> anyone know of a tool that will take java code and format it into html.
> think wiki for developers, so they need to be able to read the code
> snippets in a readable format in the wiki (mediawiki)
>
> thx

Just cut and paste the code into the html page - and put <pre> tags around
the code.
wouldn't that work?
Andrew Thompson - 07 Jan 2006 05:54 GMT
>>anyone know of a tool that will take java code and format it into html.
>>think wiki for developers, so they need to be able to read the code
>>snippets in a readable format in the wiki (mediawiki)
...
> Just cut and paste the code into the html page - and put <pre> tags around
> the code.
> wouldn't that work?

Sure would.  E.G.

<html>
<body>
<pre>
...the source code..
</pre>
</body>
</html>

..Would be a valid page containing source code that would
retain the tabs, spacing and line breaks of the original.

Of course, Roedy does some nice transforms on the source to
highlight a variety of aspects of the code (keywords, method
exits, ..) more like an IDE would.

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew

Torkel Franzen - 07 Jan 2006 06:40 GMT
> Just cut and paste the code into the html page - and put <pre> tags around
> the code.
> wouldn't that work?

 Not quite. You also need to replace some < with &lt;.
Andrew Thompson - 07 Jan 2006 06:53 GMT
>>Just cut and paste the code into the html page - and put <pre> tags around
>>the code.
>>wouldn't that work?
>
>   Not quite. You also need to replace some < with &lt;.

Oh yeah.. good point.

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew

Cram TeXeD - 12 Jan 2006 21:17 GMT
/.../
>>   Not quite. You also need to replace some < with &lt;.

No, you don't need so: use <nowiki> tag instead.

8:0) Cram TeXeD
Signature

"Des astronautes ont rencontré Dieu, et Elle est noire"

Roedy Green - 07 Jan 2006 07:56 GMT
>  Not quite. You also need to replace some < with &lt;.

I have a class to do that. see
http://mindprod.com/products1.html#ENTITIES

I can convert < to &lt; or vice versa.

I can also strip out <tags>
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Andrew McDonagh - 08 Jan 2006 18:48 GMT
>>anyone know of a tool that will take java code and format it into html.
>>think wiki for developers, so they need to be able to read the code
[quoted text clipped - 5 lines]
> the code.
> wouldn't that work?

even simpler, in MediaWiki, just start each line with a space, then
everything is treated as code and formatted appropriately...
Thomas Schodt - 09 Jan 2006 17:06 GMT
>>anyone know of a tool that will take java code and format it into html.
>>think wiki for developers, so they need to be able to read the code
[quoted text clipped - 5 lines]
> the code.
> wouldn't that work?

Use the wiki <verbatim> </verbatim> tags,
that will escape funny stuff ('<','>','&', etc.)
Thomas Schodt - 10 Jan 2006 10:22 GMT
> Use the wiki <verbatim> </verbatim> tags,
> that will escape funny stuff ('<','>','&', etc.)

Except OFC you can't have "</verbatim>" in the text...
usenetjb - 07 Jan 2006 13:09 GMT
> anyone know of a tool that will take java code and format it into html.  
> think wiki for developers, so they need to be able to read the code
> snippets in a readable format in the wiki (mediawiki)
>
> thx

http://www.palfrader.org/code2html/code2html.html
Googmeister - 08 Jan 2006 21:34 GMT
> anyone know of a tool that will take java code and format it into html.
> think wiki for developers, so they need to be able to read the code
> snippets in a readable format in the wiki (mediawiki)

Check out GNU source highlight.
http://www.gnu.org/software/src-highlite/source-highlight.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.