Python program to create SDIF entries file for Masters meet

138 views
Skip to first unread message

Liz D

unread,
Sep 25, 2021, 10:49:32 PM9/25/21
to SDIF Forum
Hello

Earlier this year I revisited a project to be able to create a SDIF file of entries for a Masters swim meet.

I found some Python code on another thread in this forum from William Arbaugh (thank you William) which I have been able to modify for my purposes.  It takes a CSV input file in a defined format and uses this to create a SDIF file which can be imported into Meet Manager.

I am sharing this code here in case it might be useful for anyone else trying to do the same thing.

A few points to note:
- There is a YAML config file which contains some of the parameters such as the input and output file names, meet name, meet dates, etc.  This saves having to modify the code.
- This is specifically for a Masters meet - the event age code is hard-coded as '20OV'
- This is only for event entries, not results
- I have found that the only essential records are: one A0 and one B1 at the start of the file, one C1 line per club, one D0 line per swimmer per event followed by one D1 line per swimmer, and a Z0 at the end of the file.

I have included the sdifv3.txt file which is the reference I use and does not appear to have changed since 1998.

If you can download data from an event registration platform or a Google form or similar and manipulate it into the specified CSV format, this will hopefully be of some use to you.

Regards
LizD

Code can be found here:2


Reply all
Reply to author
Forward
0 new messages