The task is to scan through source directory that contains a lot (thousands) files with log details from tennis matches. See few attached sample logs (one file = one tennis log). Some of the log files are incomplete, which means they are missing about some of the played balls.
There are two tasks for the script: first is to add missing points when possible (e.g. if the score provided is 15-0, followed by 40-0, i.e. that the missing point is 30-0), second is to transform each known point in the game into expanded csv format that will contain:
serving_AB (indicator which player is serving)
game_A (score in current game for player A, value can be 0, 15, 30, 40, A)
game_B (score in current game for player B, value can be 0, 15, 30, 40, A)
set_A (currently won sets by player A, value can be 0,1,2,3)
set_B (currently won_sets by player B, value can be 0,1,2,3)
s1_A - number of games won by player A in 1st set
s1_B - number of games won by player B in 1st set
s2_A - playerA/2nd set
s2_B - playerB/2nd set
s3_A - playerA/3rd set
s3_B - playerB/3rd set
s4_A - playerA/4th set
s4_B - playerB/4th set
s5_A - playerA/5th set
s5_B - playerB/5th set
The deliverable should be a script in Python, alternatives are for discussion, however some scripting language is requirement (not something that needs to be compiled before executing).
In case of any questions, please ask.
Prerequisite: know scoring of the tennis match ([url removed, login to view]).
3 freelancers are bidding on average $77 for this job
I have the skills to complete this project, will be done on time and on budget. Will likely be done in 48 hours leaving time for any tweaks or clarifications.