Topics › Parsing

SVG optimiser

I've started work on a program I've been meaning to make for a while: an SVG optimiser. I've often found myself spending a lot of time tidying, simplifying and compressing SVGs created by Inkscape or Illustrator. Sometimes, changes are merely aesthetic, e.g. reducing numbers from an unnecessary six decimal places to one, or removing unused attributes. These changes make it easier to read the file, and can reduce its size noticeably. Other changes are more practical, such as removing transforms which otherwise make it difficult to see where paths and shapes are actually placed.


Today I wrote a small Python program that is likely to be of interest to almost no one else. Still, I like it because it uses modules I've not used much before and has the potential to be very useful if only could think of a suitable project. The program goes to Victoria's blog and find out what she was doing this time last year by parsing the relavant page in her Today section.