Skip to content

Commit

Permalink
calibre.py: Watcher for calibre because sf is not maintained
Browse files Browse the repository at this point in the history
According to the developer the source should not be downloaded
from Sourceforge but from their own servers. (LP: #1286535)
Unfortunately, the directory structure makes it hard to find the
correct version. But they provide a fixed URL which redirects
to the latest source tarball. So get the location of this tarball
and print the complete URL which contains version information.
  • Loading branch information
Christoph Korn committed Mar 2, 2014
1 parent 8973a9e commit 3fc9c3d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions calibre.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/python
import httplib

def main():
conn = httplib.HTTPConnection("status.calibre-ebook.com")
conn.request("HEAD", "http://status.calibre-ebook.com/dist/src")
res = conn.getresponse()
print "<!-- %d %s -->"%(res.status, res.reason)
h = res.getheaders()
for k,v in h:
if k == "location":
print "<a href='%(v)s'>%(v)s</a>"%locals()

if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ python sandboxgamemaker.py > sandboxgamemaker.html 2> sandboxgamemaker.log
python codeslayer.py > codeslayer.html 2> codeslayer.log
python marathon.py > marathon.html 2> marathon.log
sh higan.sh > higan.html 2> higan.log
python calibre.py > calibre.hzml 2> calibre.loh

0 comments on commit 3fc9c3d

Please sign in to comment.