helper/parser to relay via ftp xboard/winboard chess games
License
mauroriccardi/watcher
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Watcher, (C) 2012 Mauro Riccardi
Watcher is a GPL program, written in javascript for node.js.
To use it to send your games live via ftp to a relay server, you must
a) use xboard/winboard, with option '-serverMoves=<filename>'
b) copy the 'watcher/' folder wherever you prefer
c) either install node.js on your system, or copy the node executable into watcher's main folder
(nowadays node comes with an installer for all major operating systems: just run it, and it will
take care of everything by itself)
d) either install node-ftp module for node.js on your node.js installation, or copy node-ftp source
into a subfolder 'watcher/node-ftp/' of the program's main folder:
you can obtain node-ftp from https://github.com/mscdex/node-ftp
(e.g. you can use the link https://github.com/mscdex/node-ftp/zipball/master to get a zipball
you should unzip into your 'watcher/node-ftp/' folder)
e) do the same as the above point d) for the module named 'keypress': either use standard npm package
manager to install it, or download the module from https://github.com/TooTallNate/keypress
(e.g. you can use the link https://github.com/TooTallNate/keypress/zipball/master to get a zipball
to unzip into your 'watcher/keypress/' folder)
f) edit your watcher.ini file to reflect the details of your system. See below for details.
g) issue command 'node watcher.js' from folder 'watcher/'
h) [DEPRECATED] start xboard with the option '-serverMoves=<filename>': don't forget to specify the same
name with the correct path into 'watcher.ini' file [this options is currently deprecated, and is not
going to be supported any longer: use xboard (currently the default) or arena instead]
i) watcher does its best to try to infer players names, but engine must take measures for this to work
reliably, due to particularities of xboard protocol; if engine uses feature 'myname=<engine name>'
then everything should work fine in ICS mode, if both engines do the same it will work also in
engine-engine local mode, to make it work in local human-engine games engine should use also feature
'name=1'; the default in this case is for winboard to grab the name from the OS: if that's not desirable
(e.g. when the computer belongs to the operator, or to the organisation of a match, or the player is
not the owner of the account) then you should start xboard/winboard with the option '-userName="<user name>"'
as well as '-debug'
Options:
currently if you launch the watcher with 'node watcher.js debug' no ftp connection is made, and instead
the pgn is output in a local file (specified by using 'remotefilename' config option detailed below);
if the watcher is launched with the command 'node watcher.js xboard', the moves will be taken from the
.debug file dumped by xboard/winboard: the location of this file (with path) must be specified to the
program by using the option 'movesfilename' in the watcher.ini file (see below for details);
if option 'arena' will be specified instead, the file specified in 'movesfilename' won't be parsed, and
will be considered a PGN file to be sent directly over to the ftp site WITHOUT ANY PROCESSING;
you can also add option 'crosstable' to generate a crosstable of the games played (beware: it turns out
quite ugly in case of gauntlets or similar tournaments);
in case the program that's going to read the produced pgn is picky about the format of the PV's, or about
any detail of the comments' format, you can add the option 'nocomment', that will suppress any comment in
the output (IMPORTANT: as for now, it WON'T work unless xboard mode is specified).
Configuration file 'watcher.ini':
This file is a simple text file, with a fixed format: each line has to be
<token> : <value>\n
where <token> is any combination of lowercase alphabetic characters plus underscores ('_'),
while <value> is any combination of digits, letters, underscores, '\', ' ', '.', '-', starting with
a letter, a digit, or an underscore.
In case this helps you, the program matches each line using the following regular expression:
([a-z_]+)\s*:\s*([\w\/\\][\w:()\\\/ .\-]+)
where you can see that there is an undetermined number of spaces between the token and the colon,
and between the colon and the value.
Admissable tokens are at present (any other token will be ignored):
username the username of your ftp connection
password the password " " " "
movesfilename the name (with path) of the file generated by xboard (the path should be the
path of xboard executable, while the name of the file is passed by the user
to the GUI via argument of '-serverMoves' option: at the moment this option
is undocumented in xboard, but something might appear into xboard docs in the
future); if cmdline option 'xboard' is used the moves will be obtained from
the xboard.debug or winboard.debug file instead; if 'arena' option is specified
on cmdline then the moves won't be parsed (useful for GUIs like Arena, that
save the game move by move in a PGN file);
NOTICE: options 'xboard' and 'arena' are mutually exclusive and last option
on cmdline wins; BTW it doesn't make any sense to specify both...
remotefilename the name of the file you want to write the pgn to, on the remote ftp server
hostname the hostname of the ftp server
delay the time interval (in msec) the program will wait before polling for new moves:
keep in mind that if the file hasn't changed, nothing will be sent via ftp
Mauro Riccardi
About
helper/parser to relay via ftp xboard/winboard chess games
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published