Posts in March, 2007

BBCode Python Module II

It's good to see a few people using my BBCode module. I have since made some small fixes and added a feature. I've added a PygmentsCodeTag that uses the excellent Pygments module to syntax highlight code within a [code][/code] tag. It supports all the languages that Pygments supports, simply specify the language in the tag (i.e. [code python][/code]). You can still use the code tag that generates <pre></pre>, if you have another syntax highlighting solution. continue reading…

BBCode Python Module

In the last few weeks I have been tinkering with a dynamic website created with Turbogears, but that's not what this blog entry is about. The website I have in mind is similar to a forum in that most of the content come from the users (can't tell you exactly what it is just yet). I wanted a way for users to post comments with simple formatting, but I didn't want to let them enter straight html - for all the problems that would cause. No doubt, some wise-guy would figure out that he could enter the <blink> tag! So I decided to implement something like BBCode, which I dubbed 'Post Markup'. continue reading…