Sorry, I completely missed that. I think I scanned the message while I was sleepy and somehow thought all was good.
I had a look now. Was able to reproduce what you described. When running the command from run_sort.bat in a cmd terminal, I see that it logs an error due to an empty string not being a valid number (fratricide column) Added the proper handling of that.
@UncleZam Thanks for the offer! Luckily the problems are quite simple. Most of the effort in this exercise (as usual in programming) seems to be to figure out the exact requirements. Dots, commaās, empty is zero, etc.
Because of that, I will let you do the translation to Danish yourself, @DanTDBV . I have put the column names in variables at the top of sort_players.py
in this version, and you can change them to whatever you like. Just make sure they are the same as in the csvās that you provide. The text between the ''
is what you should change, not the caps lock part, that is the name of the variable.
######################## Put the column names here #############################
COL_NAME = 'Name'
COL_SCORE = 'User Score'
COL_TIME = 'Time'
COL_KILLS = 'Kills'
COL_HIT_P = 'Hit %'
COL_ATK = 'ATK Seconds'
COL_FRATRICIDE = 'Fratricide'
################################################################################
For example:
######################## Put the column names here #############################
COL_NAME = 'Navn'
COL_SCORE = 'Karakter'
COL_TIME = 'Tid'
COL_KILLS = 'NedkƦmpet'
COL_HIT_P = 'TrƦf %'
COL_ATK = 'GTN sekunder'
COL_FRATRICIDE = 'EBS'
################################################################################
Btw, Python uses UTF-8 strings by default, so you can use all the æ ø Ä you like (as long as LibreOffice is also OK with that).
I have not removed the time tiebreaker yet because I am not sure if you actually want that or are proposing it to simplify the script.
If you want to remove the time tiebreaker, you should be able to do that just by removing lines 60, 61 and 73 from that same file:
60: if self.time != other.time:
61: return self.time > other.time
73: and self.time == o.Time
SortScores-master v3.zip (42.5 KB)