[llvm-commits] [patch] demo website colored terminal/clang output

David Blaikie dblaikie at gmail.com
Fri Aug 5 00:08:45 PDT 2011


I've worked up a pretty simple modification to the LLVM/clang demo
page to add coloring based on the terminal output of clang.

I'm sure there are better ways to do this - both the regex work in
perl & the stylesheet, but it's a start & I'm happy to work up any
suggested/requested changes.

There's also a library designed to do this if you're willing to
install that on the demo server & are looking for a more general
solution (my regex based solution only solves a handful of cases -
namely those that clang outputs):

http://search.cpan.org/~nuffin/HTML-FromANSI-2.03/lib/HTML/FromANSI.pm

I've attached an example html page (which would need to be placed
alongside the patched syntax.css) to show what the output should look
like. Though I've not tested this using the actual script on a web
server - only the regex alone by pulling it out into a separate test
script.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110805/72e3a149/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colordemo.patch
Type: application/octet-stream
Size: 2871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110805/72e3a149/attachment.obj>


More information about the llvm-commits mailing list