summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-02-20 09:53:36 +0100
committeremkael <emkael@tlen.pl>2019-02-20 09:53:36 +0100
commit7c2037b21f5c51ed76477f7dc7634d7aae4ec004 (patch)
treea448176c7674b0cf4a3ddb8faad58d195d04c20b
parentab689ef208e29b49cfabe9c64fbe708fb1f73dcb (diff)
Progress indicator on players pages compile
-rw-r--r--scripts/players-compile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/players-compile.py b/scripts/players-compile.py
index ed82c12..f4c012a 100644
--- a/scripts/players-compile.py
+++ b/scripts/players-compile.py
@@ -31,6 +31,7 @@ for date in sorted(dates.keys()):
players[player]['rankings'][date][field + '-change'] = 'N'
players[player]['rankings'][date][field + '-change-class'] = 'primary'
+pcount = 0
for pid, player in players.iteritems():
template = bs4(file('templates/player.html'), 'lxml')
template.select('h2.name')[0].insert(0, player['name'])
@@ -97,3 +98,6 @@ for pid, player in players.iteritems():
menu.append(copy.copy(menu_content))
file(os.path.join(output_directory, '%d.html' % pid), 'w').write(template.prettify().encode('utf-8'))
+ pcount += 1
+ sys.stdout.write("[%d/%d]\r" % (pcount, len(players)))
+ sys.stdout.flush()