swt2ctx

Convert Swiss-Chess Tournament (SWT) files into Chess Tournament Exchange (CTX) format

npm install swt2ctx
1 downloads in the last week
26 downloads in the last month

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.

npm loves you