node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



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


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

npm install swt2ctx


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');
  { 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.