summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-06-07 02:26:12 +0200
committeremkael <emkael@tlen.pl>2017-06-07 02:26:12 +0200
commit8d8184da5eef77927d89b4380d5764527a5ccb8d (patch)
tree2ef6e4cd3243e4312f6892896895abcaf127db9d /bin
parent742f0e753e3968d00ca795706dc622c41ab576a9 (diff)
Helper script for converting Cezar ranking CSV to usable format
Diffstat (limited to 'bin')
-rw-r--r--bin/convert-cezar-ranking-csv.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/convert-cezar-ranking-csv.py b/bin/convert-cezar-ranking-csv.py
new file mode 100644
index 0000000..4dcee92
--- /dev/null
+++ b/bin/convert-cezar-ranking-csv.py
@@ -0,0 +1,9 @@
+import csv, sys
+
+data = list(csv.reader(file(sys.argv[1]), delimiter=";"))
+
+output = csv.writer(file(sys.argv[2], 'w'))
+
+date = data[1][3]
+for row in data[4:-1]:
+ output.writerow([row[0], date, row[2], row[1]])