Programming notebook entries

Parsing Simulink mdl files with Pyparsing

In which I present a simple parser for Simulink mdl files, made using the excellent Pyparsing library.

Read more | Published 2007-05-14 (1 year ago) | Comments: 9 | Categories: Python, Programming

Syntax highlighting source code in Word and PowerPoint

I recently held a PowerPoint presentation which had several listings of XHTML and CSS code. Source listings are not terribly exciting to read, so I wanted to make them more readable and pretty by using syntax highlighting.

I did some research and found out that what I needed was a decent text editor that could export source code as colored HTML or RTF, that can be imported into PowerPoint and Word. To my pleasant surprise I discovered that I could use the SciTE editor based on the same Scintilla lexers used to colorize source code on fauskes.net.

Read more | Published 2005-03-20 (3 years, 1 month ago) | Comments: 3 | Categories: Programming

Syntax highlighting source code for the web with SilverCity

Syntax highlighting of code snippets is something I've always wanted to implement on fauskes.net. I wanted to generate colorized HTML from XML/HTML, CSS, PHP, LaTeX and Python source code. Writing a full-fledge, multi language syntax highlighter is not a trivial task, and I felt no need for reinventing the wheel. Therefore I went looking for an existing Python package to do all the hard work for me. Fortunately I found SilverCity.

Read more | Published 2005-02-27 (3 years, 2 months ago) | Comments: 4 | Categories: Python, Webdev, Programming