-
Notifications
You must be signed in to change notification settings - Fork 45
/
create_release_wiki_table.py
90 lines (78 loc) · 1.9 KB
/
create_release_wiki_table.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
""" This will output text with release information ready to be pasted on the
wiki page
"""
from datetime import date
#Release version
VT_VERSION = "2.2"
VT_REVISION = "b5341fe97287"
#Sourceforge information
SF_ROOT_URL = "http://downloads.sourceforge.net/project/vistrails/vistrails/"
SF_FOLDER_NAME = "v2.2"
SF_DOWNLOAD_URL = "%s%s"%(SF_ROOT_URL,SF_FOLDER_NAME)
#binaries names
MAC_64_BIN = "vistrails-mac-10.6-intel-%s-%s.dmg"%(VT_VERSION, VT_REVISION)
WIN_32_BIN = "vistrails-setup-%s-%s.zip"%(VT_VERSION, VT_REVISION)
WIN_64_BIN = "vistrails-x64-setup-%s-%s.zip"%(VT_VERSION, VT_REVISION)
ALL_PLAT_SRC = "vistrails-src-%s-%s.tar.gz"%(VT_VERSION, VT_REVISION)
#pdf
USERSGUIDE = "VisTrails.pdf"
#sizes
MAC_64_SIZE = "182.3 MB"
WIN_32_SIZE = "125.3 MB"
WIN_64_SIZE = "150 MB"
ALL_PLAT_SIZE = "19.2 MB"
USERSGUIDE_SIZE = "8.7 MB"
def create_text():
today = date.today().strftime("%Y-%m-%d")
text = """|{{Hl4}} colspan="4" |'''%s build %s (%s)''' [[known_issues|Known Issues]] {{SFReleaseNotes\
|link=https://sourceforge.net/projects/vistrails/files/vistrails/%s/README/view}}
|-
"""%(VT_VERSION, VT_REVISION, today, SF_FOLDER_NAME)
text += """|
* {{zip
|link=%s/%s
|text=%s}}
|%s
|i586
|.zip (32-bit Windows)
|-
"""%(SF_DOWNLOAD_URL, WIN_32_BIN, WIN_32_BIN, WIN_32_SIZE)
text += """|
* {{zip
|link=%s/%s
|text=%s}}
|%s
|i586
|.zip (64-bit Windows)
|-
"""%(SF_DOWNLOAD_URL, WIN_64_BIN, WIN_64_BIN, WIN_64_SIZE)
text += """|
* {{dmg
|link=%s/%s
|text=%s}}
|%s
|Mac OS X 10.6+ x64
|.dmg (Mac bundle)
|-
"""%(SF_DOWNLOAD_URL, MAC_64_BIN, MAC_64_BIN, MAC_64_SIZE)
text += """|
* {{targz
|link=%s/%s
|text=%s}}
|%s
|all
|Source .tar.gz
|-
"""%(SF_DOWNLOAD_URL, ALL_PLAT_SRC, ALL_PLAT_SRC, ALL_PLAT_SIZE)
text += """|
* {{Pdf
|link=%s/%s
|text=%s}}
|%s
|all
|.pdf
|-
"""%(SF_DOWNLOAD_URL, USERSGUIDE, USERSGUIDE, USERSGUIDE_SIZE)
print text
if __name__ == "__main__":
create_text()