summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-06-16 00:43:34 +0200
committeremkael <emkael@tlen.pl>2017-06-16 00:43:34 +0200
commited5f09ba25eca5d49ceb97149d56999dbe7fc7f6 (patch)
tree14e01d543a926110892773bb15049e0e93fa0a2c
parent0e516877457725013df20eaae0161be263419927 (diff)
Adding link to raw CSV in ranking page footer
-rw-r--r--data/rankings/2016-12-31.csv (renamed from data/rankings/2017-01.csv)0
-rw-r--r--data/rankings/2017-03-31.csv (renamed from data/rankings/2017-02.csv)0
-rw-r--r--ranking.py3
-rw-r--r--templates/player.html3
-rw-r--r--templates/ranking.html4
5 files changed, 8 insertions, 2 deletions
diff --git a/data/rankings/2017-01.csv b/data/rankings/2016-12-31.csv
index d89152d..d89152d 100644
--- a/data/rankings/2017-01.csv
+++ b/data/rankings/2016-12-31.csv
diff --git a/data/rankings/2017-02.csv b/data/rankings/2017-03-31.csv
index 41d4014..41d4014 100644
--- a/data/rankings/2017-02.csv
+++ b/data/rankings/2017-03-31.csv
diff --git a/ranking.py b/ranking.py
index e417350..1b5f989 100644
--- a/ranking.py
+++ b/ranking.py
@@ -57,4 +57,7 @@ for row in ranking:
new_row['class'] = new_row.get('class', []) + ['info']
table_body.append(new_row)
+rawlink = table.select('a#rawlink')[0]
+rawlink['href'] = '%s/%s.csv' % (rawlink['href'], ranking_date)
+
print table.prettify().encode('utf-8')
diff --git a/templates/player.html b/templates/player.html
index 6740794..024ce1c 100644
--- a/templates/player.html
+++ b/templates/player.html
@@ -71,7 +71,8 @@
</tbody>
</table>
<div class="well well-sm">
- &copy; 2017 - dla <a href="http://pzbs.pl">PZBS</a> zrobił <a href="https://emkael.info">mkl.</a> Też sobie <a href="https://github.com/emkael/pzbs-ranking">zrób.</a>
+ &copy; 2017 - dla <a href="http://pzbs.pl">PZBS</a> zrobił <a href="https://emkael.info">mkl.</a>
+ Też sobie <a href="https://github.com/emkael/pzbs-ranking">zrób.</a>
</div>
</div>
<script type="text/javascript" src="../res/jquery-2.2.4.min.js"></script>
diff --git a/templates/ranking.html b/templates/ranking.html
index f6f4696..ef338bb 100644
--- a/templates/ranking.html
+++ b/templates/ranking.html
@@ -198,7 +198,9 @@
<br />
</div>
<div class="well well-sm">
- &copy; 2017 - dla <a href="http://pzbs.pl">PZBS</a> zrobił <a href="https://emkael.info">mkl.</a> Też sobie <a href="https://github.com/emkael/pzbs-ranking">zrób.</a>
+ &copy; 2017 - dla <a href="http://pzbs.pl">PZBS</a> zrobił <a href="https://emkael.info">mkl.</a>
+ Też sobie <a href="https://github.com/emkael/pzbs-ranking">zrób.</a>
+ Dane w CSV <a href="https://raw.githubusercontent.com/emkael/pzbs-ranking/master/data/rankings" id="rawlink">tu.</a>
</div>
</div>
<script type="text/javascript" src="res/jquery-2.2.4.min.js"></script>