icu_tournament 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/icu_tournament/tournament_sp.rb +10 -3
- data/lib/icu_tournament/version.rb +1 -1
- metadata +1 -1
@@ -25,8 +25,16 @@ information.
|
|
25
25
|
tournament = parser.parse_file('champs', "2010-07-03") # looks for "champs.ini", "champs.trn" and "champs.sco"
|
26
26
|
puts parser.error unless tournament
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
Alternatively, if all three files are in a ZIP archive, the parser will extract them if the name of the
|
29
|
+
archive file (including the .zip ending) is supplied to the _parse_file_ method:
|
30
|
+
|
31
|
+
tournament = parser.parse_file('champs.zip', "2010-07-03")
|
32
|
+
|
33
|
+
Note there must be only three files in the archive, they must all have the same stem name and
|
34
|
+
their endings should be ".ini", ".trn" and ".sco" (case insensitive).
|
35
|
+
|
36
|
+
By default, the parser extracts local ratings and IDs from the SwissPerfect files. If international
|
37
|
+
ratings or IDs are required instead, use the options _id_ and _rating_. For example:
|
30
38
|
|
31
39
|
tournament = parser.parse_file('ncc', "2010-05-08")
|
32
40
|
tournament.player(2).id # => 12379 (ICU ID)
|
@@ -72,7 +80,6 @@ Should you wish to rank the tournament using a different set of tie-break rules,
|
|
72
80
|
|
73
81
|
== Todo
|
74
82
|
|
75
|
-
* Allow parsing from 1 zip file
|
76
83
|
* Implement the extra tie-break rules that SP has
|
77
84
|
|
78
85
|
=end
|