colorize

Colorize is an Application for colorizing chunks of Common Lisp, Scheme, Elisp, C, C++, or Java code. It is the same colorizing engine as lisppaste made standalone. It's licensed under the MIT license, and written by Brian Mastenbrook.

Demo output.

This is an interesting example that acts like a server-side include of colorized Lisp code for HTML.

:: To use colorize you need html-encode and split-sequence. The examples below show how to use it:

(colorize:colorize-file :lisp "demo.lisp")
(colorize:colorize-file-to-stream :lisp "demo.lisp")
(colorize::html-colorization :common-lisp "(hello world)")

The call (colorize:coloring-types) lists the different coloring types which are available.

The variable colorize:*coloring-css* returns the colouring css code.

As of March 30, 2006, colorize is not asdf-installable.

UPDATE: As of Dec. 22, 2007 (probably earlier) it has an asd file which seems to work.

To get the source:

svn co svn://unmutual.info/colorize


Is there a stable release? The svn version (as of 2006-09-07) always truncates the file. For example, when I ran it on this file using

(colorize:colorize-file :elisp "emacs.txt")
...this was the result. It also truncated a common lisp file. -- Jason Dunsmore

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively