Convert a Swiss-Chess Tournament (SWT) file into a valid Chess Tournament Exchange Format (CTX) file.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
browser
.gitignore
LICENCE
README.md
index.js
package.json

README.md

swt2ctx

Convert a Swiss-Chess Tournament (SWT) file into a valid Chess Tournament Exchange Format (CTX).

Installation

Simply install the package and its command line interface via npm:

npm install swt2ctx

Usage

The most comfortable way to convert SWT files is to use the command line interface:

swt2ctx < /my/tournament.SWT

There are multiple options to format the output, see swt2ctx --help for further information.

You can also use swt2ctx programmatically:

var convert = require('swt2ctx');
convert('/my/tournament.SWT', 
  { indent: 2, pretty: true, newline: '\n' }, 
  function handleXML(err, xml) {
  	// do whatever you want
  });

Supported SWT versions

Because this module uses the chesstournament.js' plugin to import SWT files, it supports the file versions provided by this module. Currently only tournaments of SWT version 8.xx can be parsed.