Go to the first, previous, next, last section, table of contents.

Using the CLI client

Complete Scheme definitions are provided for the following tournaments:

tourcli program is limited to loading a single tournament at time.

Quick start

To start the client for the 2002 FIFA World Cup tournament, run the client with module name as the sole argument:

$ tourcli fifawc2002

and it will load the fifawc2002 configuration from `$prefix/share/libtour/tour-defs/fifawc2002.scm'. To search a different directory before the standard one for modules use -d command line switch:

$ tourcli -d dir-with-my-modules fifawc2002

Once in the command loop, type h q or h i for list of available commands (read-only and modifying queries correspondingly). To load the results of the tournament from the batch file provided type l $prefix/share/libtour/data/fifawc2002_res.txt. If you added or removed game results, you can choose to save your changes with `s' command or at exit. Updated results will be saved in `$HOME/.libtour/fifawc2002_results.scm'. Next time tourcli is started for the 2002 FIFA WC, it will restore its state.

For examples of usage of the CLI application See section CLI client sample session.

Usage reference


h [q|i]
print usage

Queries, q command:

q i
print tour info
q s [-s <stage-id>]
print stage(s)
q g -s <stage-id> [-g <group-id>]
print group(s) for stage <stage-id>
q t -s <stage-id> [-g <group-id>]
print teams for stage <stage-id> group <group-id>
q k -s <stage-id> [-g <group-id>] [-m <game-id-list>]
print schedule for stage <stage-id> [group <group-id>], showing only game IDs <game-id-list> if provided
q p -s <stage-id> -g <group-id>
print standings for stage <stage-id> group <group-id>
q sc -s <stage-id> [-g <group-id>]
print sorting conflicts for stage <stage-id> group <group-id>
q scd -s <stage-id> -g <group-id> -pos <position-range>
print details for a sorting conflict for team positions <position-range> in stage <stage-id> group <group-id>
q x -s <stage-id> [-g <group-id>]
print excessive game ids for stage <stage-id> [group <group-id>]
q b -s <stage-id> -m <game-id>
print groups that contain game <game-id> for stage <stage-id>
q tmf
print team fields
q stf -s <stage-id>
print standings fields for stage <stage-id>
q grf -s <stage-id>
print game result fields for stage <stage-id>
q scf
print schedule fields
q df
print date format used in schedule
q hp
print position of the home team
q w
print winners
q ft -s <stage-id>
print available team filters for custom groups
q fg -s <stage-id>
print available game filters for custom groups
q fa -s <stage-id> -(ft|fg) <filter name>
print required arguments for a team or game filter
mp -s <stage-id>
print maximum point in game for stage <stage-id>

Inserts, i command:

i m -m <game-id> -r "<game-res>" [-s <stage-id>]
insert or replace result <game-res> for game <game-id>
i d -m <game-id> [-s <stage-id>]
delete result of game <game-id>
i c -s <stage-id>
set stage <stage-id> to be complete
i uc -s <stage-id>
set stage <stage-id> to be incomplete (invalidates previous stages!)
i g -s <stage-id> -g <group-id> -id <new-group-id> [-n <new-group-name>] [-ft <team-filter>] [-fg <game-filter>]
create a group with ID <new-group-id> within stage <stage-id> after group <group-id> using <team-filter> and/or <game-filter>
i dg -s <stage-id> -g <group-id>
delete a group with ID <group-id> within stage <stage-id>
i sc -s <stage-id> -g <group-id> -pos <position-range> -sol <team list>
resolve sorting conflict between teams in <position-range> in group <group-id> of stage <stage-id>

Loading/saving results:

l filename
load results from the batch file `filename'
save results of current tournament in `$HOME/.libtour/' directory

Go to the first, previous, next, last section, table of contents.