blob: 09959f130de35f763124e9820303c9820960c6bd (
plain) (
blame)
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
|
#!/usr/bin/python
def pretnum(g):
h="{:,}".format(int(g))
print g+" -> "+h
return h
h=""
l=0
for char in g:
if l % 3 == 2:
h+=","
l+=1
h+=char
print "%s -> %s" % (g, h)
return h
a=open("exp.conf", "r")
b=open("xp.html", "w")
for c in a:
d=c.split(',')
i=0
# For entry
for e in d:
# Output current limit
if i == 0:
b.write('Max Level: '+d[0]+'\n<table border=1><tr>')
# Break line every 10 entries
elif i % 10 == 3:
b.write('</tr>\n<tr>')
# Make an empty space every 100 levels
if i % 100 == 3 and int(i/100) >= 1:
z=0
# loop to make prettier
while z < 9:
z+=1
b.write('<td/>')
b.write('<td/></tr>\n<tr>')
# Do not print headers, race or type as if they were content
if i not in [0,1,2]:
b.write('<td><b>%d</b><br/>%s</td>' % (i-2, pretnum(e) ))
i+=1
# Close this table, repeat the everyline loop
b.write('</tr></table>\n\n')
|