Entries For: January 2008
2008-01-31
The 763 projects in the Collective SVN
Today I was curious about the number of projects found in the collective svn. They always seemed a lot, but I never knew how many. Until today, when I ran a xpath query over the subversion page and I found that there are 763! This number shocked me, I was expecting at most 200. My number of projects there is very small though, I can only claim ownership over 2 of them.
2008-01-28
Monty Python sketches and download script
A friend pointed me to a page with many many links to Monty Python sketches videos.
Being a Monty Python fan, I've countered with this script:
#!/usr/bin/python2.4
downloader = "/home/tibi/Software/youtube-dl.py '%s' -o '%s'"
url = "http://onemansblog.com/2006/12/01/a-compendium-of-150-monty-python-sketches/"
import lxml.html
import urllib
import os
content = urllib.urlopen(url)
etree = lxml.html.parse(content)
links = etree.xpath('//ol/li/a')
for link in links:
print "Downloading ", link.text
cmd = downloader % (link.get('href'), link.text + '.flv')
print os.popen(cmd).read()
It needs the YouTube downloader script and lxml 2.0.
2008-01-27
Problem with jQuery version 1.2.2 and getJSON
It took me a couple of hours to track this (I was just starting a new project using jQuery), but I finally nailed it: jQuery version 1.2.2 has a problem with loading JSON data from absolute urls. Use the trunk version and you'll be fine.