 |
Blogging Java code - standard mark-up tools?
Posted by jonbruce on May 20, 2005 at 10:29 AM | Comments (6)
I find myself more and more frequently writing blogs that include extensive code blocks -- I'm looking for away to automatically mark-up the code that I can publish to a blog that will similar to what any credible IDE will do automatically.
Consider this block of code that I blogged at my corporate blog site recently...
XQDataSource dataSource = null;
DDXQDataSource dataSource = (DDXQDataSource)new DDXQDataSource();
|
... and I think I could probably do better. Take a look at this site which has close to the look and feel I am looking for:
http://www.stylusstudio.com/custom_adapter.html
I am sure many bloggers on Java.net would like to see perhaps a standard template (driven perhaps by a style sheets) that we could use to mark-up any amount of code we want to publish.
Similar to my old buddy Calvin Austin (a fellow Sun Alumni) I now have the ability to code at will on our blogs and I least want to make what I write a little more readable. Any suggestions, please comment below as I am very interested to see what is out there...
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Hi, https://jhighlight.dev.java.net/ is an embeddable pure Java source code highlighter that outputs as XHtml with CSS. If there's some interest, I can easily put it online as a service where you can highlight any code and copy/paste the XHtml result.
Posted by: gbevin on May 20, 2005 at 11:25 AM
-
GBevin... It would be great if you could make jhighlight an online service.
Posted by: johnreynolds on May 20, 2005 at 11:31 AM
-
You can use netbeans and click on File->Print to Html
Posted by: raharsha on May 23, 2005 at 04:27 AM
-
Don't get me wrong, formatting and highlighting are extrodinarily helpful things for code samples. jEdit has long had a nice feature for HTMLizing code. However, one of my favorite ways to play around with an unfamiliar API is to use BeanShell. Just today, a new BeanShell release addressed a limitation that prevented using it in applets. An easy way to launch a code fragment in BeanShell would be uber-cool. Hey--doesn't Sun have at least one full-time employee working on Java blogging software?
Posted by: coxcu on May 23, 2005 at 05:25 AM
-
Hi Geert,
That will be nice.
Also, if you could look at this http://www.theserverside.com/news/thread.tss?thread_id=33532#167946 comment on theserverside, it would be nice.
thank you,
BR,
~A
Posted by: anjanb2 on May 23, 2005 at 12:38 PM
-
Personnaly I use the test forum of javadesktop to auto-color my code before commiting it to a blog/wiki :
U start a new thread , then u add your code between the [code] and [/code] tags .. then make a preview of the post ...
then copy the sources of the preview
and that's it
well that's not a real solution ... but that's simple and that works ..
here is the link to the test forum of javadesktop :
http://www.javadesktop.org/forums/forum.jspa?forumID=42
dwarfy
Posted by: dwarfy on May 24, 2005 at 01:07 AM
|