Using Cairo to generate SVG in Django

Cairo is a 2D vector graphics api used by Firefox, Gtk and other desktop projects.

I’m going to show here that it can also be used to generate web content, using Django.

I’m going to port two examples from the Michael Urmans Cairo Tutorial for PyGTK Programmers.

To understand the cairo and it’s drawing model I’d recommend his his Cairo Tutorial for Python Programmers.

Note: In this example I’ll be generating SVGs…  as I.E. (as of 2010) does not support them, you might want to generate PNG or PDF – if you need to do this with cairo, look for one of the many cairo tutorials on the web.

The example django project can be downloaded at the end of the article.

Continue reading

Multitudes of addons and greasemonkey scripts

It seems I use more addons for firefox than I thought… to help speed up setup on other computers I’ve made a page with the current addons and greasemonkey scripts in use… The current list looks like this:

Now if only there was a greasemonkey script or addon to install these automatically I’d be sorted :)