Saturday 12 June 2004 — This is over 20 years old. Be careful.
In Fredrik Lundh’s breezy list of happenings at EuroPython I saw a reference to SilverCity. It’s a Python module for lexing source code, making use of Scintilla. This is an odd inversion: I would have expected a syntax-coloring editor to make use of a lexer module, not the other way around, but so be it.
I hooked up SilverCity into my blog system, tagged my samples by language, and it works great. Now my code samples are all syntax colored automatically. And with the samples tagged, I can also compile a useless census of code samples by language:
Python | 17 | C++ | 14 |
HTML | 9 | PostScript | 5 |
XSLT | 4 | CSS | 3 |
JavaScript | 3 |
with one each for ActionScript, DOS batch file, M3U, Perl, .htaccess, PHP, and XML.
Aside from all the code samples that were really just text files or console displays, the trickiest entry was the polyglot C and PostScript code, where syntax coloring for a single language would ruin the fun.
Comments
I was thinking of making one, but thought I'd look first.
Add a comment: