Syntax highlighting using the kulrii.heroku.com web service.
Run the following if you haven't already:
$ gem sources -a http://gems.github.com
Install the gem(s):
$ sudo gem install -r sbfaulkner-kulriir
From the command-line...
Usage: kulriir [options] [file ...] Options: -h, --help Display this message. -n, --numbers Include line numbers. -S, --syntaxes List all supported syntaxes. -s, --syntax=name The language for the code to be highlighted. -T, --themes List all supported themes. -t, --theme=name The theme to use for code highlighting.
File.read('hello.rb').highlight(:numbers => true)
<pre class="mac_classic"><span class="line-numbers"> 1 </span> <span class="Keyword">def</span> <span class="FunctionName">hello</span> <span class="line-numbers"> 2 </span> puts <span class="String"><span class="String">"</span>hello<span class="String">"</span></span> <span class="line-numbers"> 3 </span> <span class="Keyword">end</span> </pre>
Author: S. Brent Faulkner firstname.lastname@example.org
License: Copyright © 2008 unwwwired.net, released under the MIT license