Mon 30 Sep 2013
Python is my programming language of choice, its easy and a nicely structured.
Events in kilkenny is written in python using the web2py framework.
Over the last while getting people to add events was proving quite difficult…So with the help of python I wrote a few parsers for grabbing information off different websites. Parsing websites can be quite difficult as it might not be structured in a way that allows easy access to content.
For events in kilkenny I have made it very easy to parse the content. and if you have some programming skills you could actually grab all the content of my site without breaking a sweat, that’s how easy I make it.
For starters I add schema.org json code to the actual web page, and to the HTML tag.
Python has a wonderful library call beautifulSoup that is ideal for parsing good and malformed html and I use this library extensively. It took we a few hours to actually write the parser but to me the few hours spend writing the parser in python, will in the long run will save me hours as I will not having to add events manually to the site. Adding 20 events took me less than 1 minutes, I’m a big fan of automation and if something can save me minutes or hours then I’ll go for that.
Some sites I parse are easy enough but some are not, Most sites I am parsing are using wordpress with some sort of events plugin, but unfortunately the plugin does not cater for structured data mostly everything it wrapped around <p> </p> html tags.
Anyway if your are starting out in the world of programming I would recommend python as not only is it easy to understand but you can get productive very fast.