> > And where can I find the source code? It seems your redirect tool does > > not work when supplying HTTP Range headers. > > Apparently, in SVN: > https://fisheye.toolserver.org/browse/dab/TS-thumb/
Ok, pretty trivial. In case someone ever needs a python snippet for let's say a pywikipedia based bot: import hashlib import urllib2 m = hashlib.md5() m.update( name ) h = m.hexdigest() url = "http://upload.wikimedia.org/wikipedia/commons/thumb/%s/%s/%s/120px-%s"\ % ( h[0], h[0:2], urllib2.quote(name), urllib2.quote(name) ) Just take "name" straight as mysql returns it from a db query, otherwise the hash will most likely be wrong. -- [[en:User:Dschwen]] [[de:Benutzer:Dschwen]] [[commons:User:Dschwen]] _______________________________________________ Toolserver-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/toolserver-l
