Sunday, September 14, 2008

Show Formatted Source Code with Syntax Highlight

LibG Code Viewer is a free web tool to view source code with syntax highlight.

After I finished my post How to format source code in your blog, I decided to make a small tool for anyone who post source code file on Internet. I called this tool "LibG Code Viewer", it used the method I described in my previous blog. Here is the usage of this tool:

http://libg.org/code.php?lang=your source language&url=link to your source code

Below is the list of supported language and sample:

LanguageParameterSample
C++cpphttp://libg.org/code.php?lang=cpp&url=http://libg.org/code/sample.cpp
C#csharphttp://libg.org/code.php?lang=csharp&url=http://libg.org/code/sample.cs
CSScsshttp://libg.org/code.php?lang=css&url=http://libg.org/code/sample.css
Delphidelphihttp://libg.org/code.php?lang=delphi&url=http://libg.org/code/sample.pas
Javajavahttp://libg.org/code.php?lang=java&url=http://libg.org/code/sample.java
Java Scriptjshttp://libg.org/code.php?lang=js&url=http://libg.org/code/sample.js
PHPphphttp://libg.org/code.php?lang=php&url=http://libg.org/code/sample.phpcode
Pythonpyhttp://libg.org/code.php?lang=py&url=http://libg.org/code/sample.py
Rubyrubyhttp://libg.org/code.php?lang=ruby&url=http://libg.org/code/sample.rb
Sqlsqlhttp://libg.org/code.php?lang=sql&url=http://libg.org/code/sample.sql
VBvbhttp://libg.org/code.php?lang=vb&url=http://libg.org/code/sample.vb
XML/HTMLxmlhttp://libg.org/code.php?lang=xml&url=http://libg.org/code/sample.xml

You can use the form below to test LibG Code Viewer:

Language:
Source Code Link:


1 comment: