Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (18 sloc) 0.739 kb
#!/usr/bin/python
from rabbithole import *
stats = {}
percents = re.compile("<strong>([^<]+)</strong>[\n ]*&nbsp;[\n ]*(\d+)%", re.MULTILINE)
def collectStat(matchObj):
global stats
measure = matchObj.group(1)
value = matchObj.group(2)
stats[measure] = value
return ""
percents.sub(collectStat, GetWebPage(config["cobertura"]))
data = SaveUpdates("cobertura", stats)
page = GetTemplate("coverage")
page = FillTemplate(page, {"##COVERAGECHART##": MakeWikiProgressChart(data)})
print "Publishing to wiki"
WriteFile("temp.tmp", page)
GetWiki({"action": "storePage", "space": config["personal_space"], "title": "Code Coverage", "file": "temp.tmp", "parent": config["parent_page"]})
os.remove("temp.tmp")
Jump to Line
Something went wrong with that request. Please try again.