3 from __future__
import print_function
14 <link rel="stylesheet" href="http://libuv.org/styles/vendor.css">
15 <link rel="stylesheet" href="http://libuv.org/styles/main.css">
29 border-collapse: initial;
32 table table tr:nth-child(even) {{
33 background-color: #777;
38 <table>{groups}</table>
67 <a href="http://dist.libuv.org/dist/{tag}/">{tag}</a>
70 <a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz">tarball</a>
78 <a href="http://dist.libuv.org/dist/{tag}/libuv-{tag}.tar.gz.sign">gpg</a>
83 <a href="http://dist.libuv.org/dist/{tag}/">exe</a>
87 return map(int, re.match(
'^v(\d+)\.(\d+)\.(\d+)', tag).
groups())
98 maybe_gpg = GPG.format(**locals())
99 maybe_exe = EXE.format(**locals())
100 return ROW.format(**locals())
103 rows =
''.join(
row_for(tag)
for tag
in tags)
104 return GROUP.format(rows=rows)
109 groups = groups[:] + [
''] * (n - 1)
110 while len(groups) >= n:
111 html += GROUPS.format(groups=groups)
115 if __name__ ==
'__main__':
116 os.chdir(os.path.dirname(__file__))
117 tags = subprocess.check_output([
'git',
'tag'])
118 tags = [tag
for tag
in tags.split(
'\n')
if tag.startswith(
'v')]
119 tags.sort(key=version, reverse=
True)
120 groups = [
group_for(list(g))
for _, g
in itertools.groupby(tags, major_minor)]
122 html = HTML.format(groups=groups).strip()
123 html = re.sub(
'>\\s+<',
'><', html)