Highlighting source code

Until now getting my code to look the way I wanted using WordPress was a real pain, highlighting keywords and replacing any ‘special’ characters with the corresponding HTML code is technically easy enough but it is very repetitive process and prone to silly errors.

Having started to get the hang of some basic Python commands I decided to write a short script (well that was the intention) to highlight my source code for me and turn it into something that I could just paste into WordPress. On the way I decided that having my code highlighted in colour on the console using ANSI escape sequences was quite fun too.

The latest incarnation of this script can be found here.

This entry was posted in Programming and tagged , , . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.