From eafd1076c5971aa1fe350d67f1d474889e92591b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 14 Jun 2018 17:10:12 -0300 Subject: Experience Database Converter --- exp_conv.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 exp_conv.py diff --git a/exp_conv.py b/exp_conv.py new file mode 100755 index 0000000..9acf468 --- /dev/null +++ b/exp_conv.py @@ -0,0 +1,21 @@ +#!/usr/bin/python2 + +print("Please be sure the legacy database is on exp.txt,") +print("And you have a template ready. It'll output to EDITME.") +print("Max value and races will be disregarded.") + +f=open("exp.txt", "r") +o=open("EDITME", "w") + +for a in f: + b=a.split(',') + cnt=0 + for x in b: + if cnt not in [0, 1]: + o.write(x+',') + cnt+=1 + if (cnt-2) % 10 == 0: + o.write('\n') + +f.close() +o.close() -- cgit v1.2.3-70-g09d2