Delimited Text Files (DTF)
Delimited text files (DTFs) provide an alternative method to save and load player information. This feature is useful when you receive a list of players to register from a comma-separated values (CSV) file or other delimited format.
You can also use this feature to export tournament information to files that any database program can import, allowing you to work with your tournament data outside of SwissSys.
Chess.com Files
CSV files from Chess.com tournament reports require no special setup and can be read directly using the Read Chess.com report submenu command.
Setting Up Other DTF Formats
Before working with other delimited file formats, you need to tell SwissSys what information the file contains using the Setup submenu.
Use Setup to specify:
- Which data fields are in the delimited file
- How they will be labeled
For example, if you want your DTF file to contain name, ID, rating, and team information, you would fill in the corresponding boxes in the setup dialog, labeling each field with the identifier that appears in the DTF file’s header.
DTF Format
Your DTF file must include a header line at the top of the file. Each field in the header line should be separated by your delimiting character (usually a comma). Here is a typical header line for the example above, although you can label fields however you want (quotes are optional):
"Name","ID","Rating","Team"File Structure Requirements
- Fields can appear in any order in the header and file
- Field identifiers must match the ones you enter in the setup dialog
- The default buttons provide headers that work in most cases without adjustment
Player Data Format
Player data comes after the header, one line per player. For example:
"Suits,Thad",12475278,2564,GFImportant: Player data should be quoted if it includes a delimiter (as with the name above that contains a comma). Other quotes are optional.
Field Handling
- If you include fields in the setup dialog that are not found in the DTF file, those fields will be ignored
- If there are fields in the header that do not appear in the dialog boxes, you will get a warning
- Missing fields for data that SwissSys calculates (like tiebreaks) or doesn’t support can be safely ignored
Game Results Format
Game results are stored in one of two common standings formats:
- Result code first: “L21B” (lost to player 21 as black)
- Color code first: “B21L” (black vs player 21, lost)
When reading results, mathematical characters (+ for win, etc.) are also acceptable. You must specify which format to expect using the “Result format” option in the setup dialog.
Using DTF Files
Once set up, you can use the Import and Write to DTF submenu commands to work with these files.
Important Notes
Bye Format
The reserved byes field is stored in club list bye format:
- Half-point byes: just the round number
- Zero-point byes: round number followed by “z”
- Example: “2 3 4z” (half-point byes in rounds 2 and 3, zero-point bye in round 4)
Round Results Headers
When saving results in the file:
- Header identifiers are automatically set to “Rd1”, “Rd2”, etc.
- These identifiers cannot be changed
- “Rnd1”, “Rnd2”, etc. are also acceptable when reading files
Multi-Section Tournaments
For tournaments with multiple sections:
- You can save all players to a single DTF file
- If you include the player section as part of the DTF file, you can load only players for a specific section
- Importing must be done separately for each section (no command to seed all sections at once)
Duplicate Player Handling
- SwissSys does not check for duplicate players when writing to a DTF file
- When reading, duplicate players will be automatically skipped