Last modified: 27.09.2008

Geany release finder

During playing arround 've created a little Python script that is checking for current version of Geany and might could be useful for somebody.


#!/usr/bin/python
# -*- coding: iso-8859-1 -*-

import urllib

link = "http://files.uvena.de/geany/"

def findRelease(URL):
    page = urllib.urlopen ( URL )
    content = page.read()
    page.close
    return findVersionString(content)
	
def findVersionString(content):
    pos = content.find("LATEST-IS-")
    content = content[pos:]
    end_pos = content.find('"')
    content = content [10:end_pos]
    return content
					
print findRelease ( link )