worldfootball 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/wfbsync ADDED
@@ -0,0 +1,205 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ##
4
+ ## rename to wfbget or wfbpull or such - why? why not?
5
+
6
+
7
+ ## tip: to test run:
8
+ ## ruby -I ./lib bin/wfbsync
9
+ ## or
10
+ ## ruby -I wfb/lib wfb/bin/wfbsync
11
+ ## or
12
+ ## ruby -I wfb/lib wfb/bin/wfbsync -f world.csv
13
+
14
+
15
+ ###
16
+ ## only download if NOT cached
17
+ ## ALWAYS download if season is latest e.g 2024/25 or 2025
18
+
19
+
20
+
21
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db/timezones/lib' )
22
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db/fifa/lib' )
23
+ require 'worldfootball'
24
+
25
+
26
+ Webcache.root = if File.exist?( '/sports/cache' )
27
+ puts " setting web cache to >/sports/cache<"
28
+ '/sports/cache'
29
+ else
30
+ './cache'
31
+ end
32
+
33
+ ## convert (default) output directory
34
+ Worldfootball.config.convert.out_dir = if File.exist?( '/sports/cache.wfb')
35
+ puts " setting convert out_dir to >/sports/cache.wfb<"
36
+ '/sports/cache.wfb'
37
+ else
38
+ './tmp' ## use tmp in working dir
39
+ end
40
+
41
+
42
+
43
+ require 'optparse'
44
+
45
+
46
+
47
+ module Worldfootball
48
+ def self.main_sync( args=ARGV )
49
+
50
+ opts = {
51
+ debug: false,
52
+ convert: true,
53
+ file: nil,
54
+ }
55
+
56
+
57
+ parser = OptionParser.new do |parser|
58
+ parser.banner = "Usage: #{$PROGRAM_NAME} [options]"
59
+
60
+ ##
61
+ ## check if git has a offline option?? (use same)
62
+ ## check for other tools - why? why not?
63
+
64
+ ## todo - add a single letter option for offline/cached
65
+
66
+
67
+ parser.on( "--[no-]convert",
68
+ "turn on/off conversion to (tabular) .csv format in #{Worldfootball.config.convert.out_dir} - default is (#{opts[:convert]})" ) do |convert|
69
+ opts[:convert] = convert # true|false
70
+ end
71
+
72
+
73
+ parser.on( "-f FILE", "--file FILE",
74
+ "read leagues (and seasons) via .csv file") do |file|
75
+ opts[:file] = file
76
+ end
77
+ end
78
+
79
+
80
+
81
+
82
+ parser.parse!( args )
83
+
84
+ puts "OPTS:"
85
+ p opts
86
+ puts "ARGV:"
87
+ p args
88
+
89
+
90
+ ## turn on debug output
91
+ if opts[:debug]
92
+ Worldfootball.debug = true
93
+ else
94
+ Worldfootball.debug = false
95
+ end
96
+
97
+
98
+ ####
99
+ # assume leagues
100
+
101
+ datasets = if opts[:file]
102
+ read_leagueset( opts[:file] )
103
+ else
104
+ raise ArgumentError, "file required; sorry"
105
+ end
106
+
107
+
108
+
109
+ ## step 0 - validate and fill-up seasons etc.
110
+ datasets.each do |league_key, seasons|
111
+
112
+ league = find_league!( league_key ) ## league info lookup
113
+
114
+ ## output more page meta info
115
+ puts "league meta:"
116
+ pp league
117
+
118
+ ## note - default to latest season of league
119
+ ## might be 2024/25 or 2024 or
120
+ # for world cup 2022 or such
121
+ if seasons.empty?
122
+ season = Season(league.seasons.keys[0])
123
+ seasons << season
124
+ end
125
+ end
126
+
127
+
128
+ ###
129
+ ## collect league names & more
130
+ extra = {}
131
+
132
+
133
+ ## step 1 - download
134
+ ##
135
+
136
+ ## note - only download if NOT cached
137
+ ## or if seasson is latest
138
+
139
+
140
+
141
+ datasets.each do |league_key, seasons|
142
+ league = find_league!( league_key ) ## league info lookup
143
+ seasons.each do |season|
144
+ pages = league.pages!( season: season )
145
+ puts
146
+ pp [league.key, season.key]
147
+ pp pages
148
+ puts " #{pages.size} page(s)"
149
+
150
+
151
+ ### check for latest season
152
+ ### if latest than ALWAYS overwrite (that is, do NOT use cached version)
153
+ overwrite = false
154
+
155
+ overwrite = true if season == Season('2025') ||
156
+ season == Season('2024/25')
157
+
158
+
159
+ pages.each_with_index do |(slug,_),i|
160
+ puts "==> #{i+1}/#{pages.size} - #{league_key} @ #{slug}..."
161
+
162
+ if !overwrite && Webcache.cached?( Metal.schedule_url( slug ))
163
+ puts " OK #{league_key} #{season.key} - #{slug} (do NOT overwrite)"
164
+ else
165
+ Metal.download_schedule( slug )
166
+ end
167
+ end
168
+
169
+
170
+ ##
171
+ ## check for/collect extra (debug) league info
172
+ pages.each_with_index do |(slug,_),i|
173
+ puts "==> #{i+1}/#{pages.size} - #{league_key} @ #{slug}..."
174
+ page = Page::Schedule.from_cache( slug )
175
+ matches = page.matches
176
+
177
+ puts " #{matches.size} match(es)"
178
+
179
+ league_extra = extra[ league.key ] ||= {}
180
+ season_extra = league_extra[ season.key] ||= { names: [] }
181
+ season_extra[:names] << page.title
182
+ end
183
+ end # each seasons
184
+ end # each league
185
+
186
+
187
+ if opts[:convert]
188
+ ## step 2 - convert
189
+ datasets.each do |league_key, seasons|
190
+ seasons.each do |season|
191
+ ## write out (export to) comma-separated values (.csv) datafile
192
+ convert( league: league_key,
193
+ season: season )
194
+ end
195
+ end
196
+ end
197
+
198
+ end # def self.main
199
+ end # module Worldfootball
200
+
201
+
202
+ Worldfootball.main_sync( ARGV )
203
+
204
+
205
+ puts "bye"
data/bin/wfbup ADDED
@@ -0,0 +1,101 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ ## tip: to test run:
4
+ ## ruby -I ./lib bin/wfbup
5
+ ## or
6
+ ## ruby -I wfb/lib wfb/bin/wfbup
7
+
8
+
9
+ ##
10
+ ## add offset for restart!!!!
11
+ ## e.g. si.1 - maybe add season later!!!
12
+ ## or better add a expired option e.g. 24h or such !!!!
13
+ ## - stopping at si.1 2017/18...
14
+
15
+
16
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db/timezones/lib' )
17
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db/fifa/lib' )
18
+ require 'worldfootball'
19
+
20
+
21
+ Webcache.root = if File.exist?( '/sports/cache' )
22
+ puts " setting web cache to >/sports/cache<"
23
+ '/sports/cache'
24
+ else
25
+ './cache'
26
+ end
27
+
28
+ ## convert (default) output directory
29
+ Worldfootball.config.convert.out_dir = if File.exist?( '/sports/cache.wfb')
30
+ puts " setting convert out_dir to >/sports/cache.wfb<"
31
+ '/sports/cache.wfb'
32
+ else
33
+ './tmp' ## use tmp in working dir
34
+ end
35
+
36
+ Worldfootball.config.generate.out_dir = if File.exist?( '/sports/cache.wfb.txt')
37
+ puts " setting generate out_dir to >/sports/cache.wfb.txt<"
38
+ '/sports/cache.wfb.txt'
39
+ else
40
+ './tmp' ## use tmp in working dir
41
+ end
42
+
43
+
44
+ require 'optparse'
45
+
46
+ ##
47
+ # by default convert all with overwrite/force set to false
48
+
49
+ Webget.config.sleep = 2
50
+
51
+ args = ARGV
52
+
53
+ opts = {
54
+ force: false, # a.k.a. overwrite
55
+ }
56
+
57
+
58
+ parser = OptionParser.new do |parser|
59
+ parser.banner = "Usage: #{$PROGRAM_NAME} [options]"
60
+
61
+
62
+ parser.on( "--force",
63
+ "always overwrite (force) datafile - default is (#{opts[:force]})" ) do |force|
64
+ opts[:force] = true # true|false
65
+ end
66
+ end
67
+
68
+
69
+ parser.parse!( args )
70
+
71
+ puts "OPTS:"
72
+ p opts
73
+ puts "ARGV:"
74
+ p args
75
+
76
+
77
+ keys = if args.size == 0
78
+ Worldfootball::LEAGUES.keys
79
+ else
80
+ args
81
+ end
82
+
83
+
84
+
85
+ keys.each_with_index do |key, i|
86
+ league = Worldfootball::LEAGUES[key]
87
+ seasons = league.seasons
88
+
89
+ puts "==> #{i+1}/#{keys.size} #{key} - #{seasons.size} seasons(s)..."
90
+
91
+ seasons.each_with_index do |season_rec,j|
92
+ season = season_rec[0]
93
+
94
+ puts " #{j+1}/#{seasons.size} #{key} #{season}..."
95
+ Worldfootball.schedule( league: key, season: season,
96
+ overwrite: opts[:force] )
97
+ end
98
+ end
99
+
100
+
101
+ puts "bye"
@@ -23,21 +23,33 @@ ca.cup, can-canadian-championship-2024
23
23
  # - Finale
24
24
  # /mex-primera-division-2018-2019-clausura-playoffs/
25
25
  mx.1, mex-primera-division-2024-2025-apertura_2
26
- mx.2, mex-liga-de-expansion-2024-2025-apertura
26
+
27
+ ## merge expansion and ascenso into one (mx.2) - possible? why? why not?
28
+
29
+ ## first expansion season -> 2020/21 Apertura
30
+ ## last ascenso season -> 2019/20 Clausura
31
+ mx.2.expansion, mex-liga-de-expansion-2024-2025-apertura
32
+ mx.2.ascenso, mex-liga-de-ascenso-2019-2020-clausura
33
+
27
34
  mx.cup, mex-copa-mx-2019-2020
28
35
 
29
36
 
30
- ### fix add from / to seasons !!! for mx!!!!
31
- mx.3, mex-premier-de-ascenso-2020-2021-grupo-b
37
+ mx.3.a, mex-lp-serie-a-2024-2025-apertura
38
+ mx.3.b, mex-lp-serie-b-2024-2025-apertura
32
39
 
33
40
 
34
41
 
35
42
  ## change to mls - why? why not?
43
+ ## note - add alt msl for now
44
+
36
45
  us.1, usa-major-league-soccer-2024
46
+ mls, usa-major-league-soccer-2024
47
+
37
48
  us.2, usa-usl-championship-2024
38
49
  us.cup, usa-u-s-open-cup-2024
39
50
 
40
51
 
52
+
41
53
  concacaf.cl, concacaf-champions-league-2020
42
54
 
43
55
 
@@ -92,7 +104,7 @@ ve.1, ven-primera-division-2024-clausura
92
104
 
93
105
 
94
106
  copa.l, copa-libertadores-2020
95
-
107
+ copa.s, copa-sudamericana-2025
96
108
 
97
109
  ###################
98
110
  ### Central America & Caribbean Islands
@@ -33,26 +33,42 @@ hu.1, hun-nb-i-2024-2025
33
33
 
34
34
  cz.1, cze-1-fotbalova-liga-2024-2025
35
35
  cz.2, cze-2-fotbalova-liga-2024-2025
36
- cz.3, cze-3-fotbalova-liga-2024-2025-cfl-a
36
+
37
+ ## commented out for now (three leagues in one - split !!)
38
+ ## cz.3, cze-3-fotbalova-liga-2024-2025-cfl-a
39
+
37
40
 
38
41
  sk.1, svk-super-liga-2024-2025
39
42
 
40
43
  pl.1, pol-ekstraklasa-2024-2025
41
44
 
42
45
 
46
+
43
47
  #########
44
48
  ### British Isles / Western Europe
49
+ ##
50
+ ## fix - move to config europe-british_isles !!!
45
51
 
46
52
  eng.1, eng-premier-league-2024-2025
47
53
  eng.2, eng-championship-2024-2025
48
54
  eng.3, eng-league-one-2024-2025
49
55
  eng.4, eng-league-two-2024-2025
50
56
  eng.5, eng-national-league-2024-2025
57
+
58
+
59
+ ### use fa cup and efl cup (league cup) as codes for now
60
+ ## use eng.cup.fa and cup.efl instead - why? why not?
61
+ eng.fa.cup, eng-fa-cup-2023-2024
62
+ eng.efl.cup, eng-league-cup-2024-2025
63
+ ## "old" codes for compat (cup and cup.l aka league cup)
51
64
  eng.cup, eng-fa-cup-2023-2024 ### update to 2024-2025 later!!!
52
65
  eng.cup.l, eng-league-cup-2024-2025
53
66
 
67
+
68
+
69
+
54
70
  sco.1, sco-premiership-2024-2025
55
- wal.1, wal-premier-league-2024-2025
71
+ wal.1, wal-premier-league-2024-2025
56
72
  nir.1, nir-premier-league-2024-2025
57
73
  ie.1, irl-premier-division-2024
58
74
 
@@ -151,7 +167,7 @@ rs.1, srb-super-liga-2024-2025
151
167
  si.1, svn-prvaliga-2024-2025
152
168
 
153
169
  ## todo/fix - change to kos.1 - why? why not?
154
- xk.1, kos-superliga-2024-2025
170
+ ## xk.1, kos-superliga-2024-2025
155
171
  kos.1, kos-superliga-2024-2025
156
172
 
157
173
 
data/config/rounds.csv CHANGED
@@ -1,28 +1,66 @@
1
1
  key, name1, name2
2
2
 
3
3
  ## de to en
4
- *, 1. Runde, Round 1
5
- *, 2. Runde, Round 2
6
- *, 3. Runde, Round 3
7
- *, 4. Runde, Round 4
8
- *, 5. Runde, Round 5
9
- *, 6. Runde, Round 6
10
- *, 7. Runde, Round 7
11
- *, 8. Runde, Round 8
12
- *, 9. Runde, Round 9
13
- *, Achtelfinale, Round of 16
14
- *, Viertelfinale, Quarterfinals
15
- *, Halbfinale, Semifinals
16
- *, Finale, Final
17
-
4
+ *, 1. Runde, Round 1
5
+ *, 2. Runde, Round 2
6
+ *, 3. Runde, Round 3
7
+ *, 4. Runde, Round 4
8
+ *, 5. Runde, Round 5
9
+ *, 6. Runde, Round 6
10
+ *, 7. Runde, Round 7
11
+ *, 8. Runde, Round 8
12
+ *, 9. Runde, Round 9
13
+ *, Sechzehntelfinal, Round of 32
14
+ *, Achtelfinale, Round of 16
15
+ *, Viertelfinale, Quarterfinals
16
+ *, Halbfinale, Semifinals
17
+ *, Finale, Final
18
+
19
+ *, Spiel um Platz 6, Match 6th Place
18
20
  *, Spiel um Platz 3, Match for 3rd place
19
21
 
22
+ *, 11. Platz, Match 11th Place
23
+ *, 9. Platz, Match 9th Place
24
+ *, 7. Platz, Match 7th Place
25
+ *, 5. Platz, Match 5th Place
26
+
27
+
20
28
  *, Vorrunde, Preliminary round
21
29
 
22
30
  *, Qual. 1. Runde, Qual. Round 1
23
31
  *, Qual. 2. Runde, Qual. Round 2
24
32
 
25
33
 
34
+ *, Entscheidungsspiel, Decider
35
+ *, Finalrunde, Finals ## use Final round ???
36
+ *, Ligaphase, League phase
37
+
38
+
39
+
40
+ *, Gruppe A, Group A
41
+ *, Gruppe B, Group B
42
+ *, Gruppe C, Group C
43
+ *, Gruppe D, Group D
44
+ *, Gruppe E, Group E
45
+ *, Gruppe F, Group F
46
+ *, Gruppe G, Group G
47
+ *, Gruppe H, Group H
48
+ *, Gruppe I, Group I
49
+ *, Gruppe J, Group J
50
+ *, Gruppe K, Group K
51
+ *, Gruppe L, Group L
52
+
53
+ *, Gruppe 1, Group 1
54
+ *, Gruppe 2, Group 2
55
+ *, Gruppe 3, Group 3
56
+ *, Gruppe 4, Group 4
57
+ *, Gruppe 5, Group 5
58
+ *, Gruppe 6, Group 6
59
+ *, Gruppe 7, Group 7
60
+ *, Gruppe 8, Group 8
61
+
62
+
63
+
26
64
 
27
65
  ## es to en
28
66
  *, Recalificación, Reclassification
@@ -39,47 +77,50 @@ mx.2, Qual. 2. Runde, Play-in round 2
39
77
 
40
78
  ###
41
79
  ## quick fix - move groups to new groups column!!!!
42
- ar.1, Gruppe A, Group
43
- ar.1, Gruppe B, Group
44
- ar.1, Gruppe C, Group
45
- ar.1, Gruppe D, Group
46
- ar.1, Gruppe E, Group
47
- ar.1, Gruppe F, Group
48
- ar.1, Gruppe 1, Group
49
- ar.1, Gruppe 2, Group
50
-
51
- co.1, Gruppe A, Group
52
- co.1, Gruppe B, Group
53
-
54
- caf.cl, Gruppe A, Group
55
- caf.cl, Gruppe B, Group
56
- caf.cl, Gruppe C, Group
57
- caf.cl, Gruppe D, Group
58
-
59
-
60
- uefa.cl, Gruppe A, Group
61
- uefa.cl, Gruppe B, Group
62
- uefa.cl, Gruppe C, Group
63
- uefa.cl, Gruppe D, Group
64
- uefa.cl, Gruppe E, Group
65
- uefa.cl, Gruppe F, Group
66
- uefa.cl, Gruppe G, Group
67
- uefa.cl, Gruppe H, Group
68
-
69
- uefa.el, Gruppe A, Group
70
- uefa.el, Gruppe B, Group
71
- uefa.el, Gruppe C, Group
72
- uefa.el, Gruppe D, Group
73
- uefa.el, Gruppe E, Group
74
- uefa.el, Gruppe F, Group
75
- uefa.el, Gruppe G, Group
76
- uefa.el, Gruppe H, Group
77
-
78
- uefa.conf, Gruppe A, Group
79
- uefa.conf, Gruppe B, Group
80
- uefa.conf, Gruppe C, Group
81
- uefa.conf, Gruppe D, Group
82
- uefa.conf, Gruppe E, Group
83
- uefa.conf, Gruppe F, Group
84
- uefa.conf, Gruppe G, Group
85
- uefa.conf, Gruppe H, Group
80
+ #### no longer use - keep group (do NOT generalize)
81
+ # ar.1, Gruppe A, Group
82
+ # ar.1, Gruppe B, Group
83
+ # ar.1, Gruppe C, Group
84
+ # ar.1, Gruppe D, Group
85
+ # ar.1, Gruppe E, Group
86
+ # ar.1, Gruppe F, Group
87
+ # ar.1, Gruppe 1, Group
88
+ # ar.1, Gruppe 2, Group
89
+
90
+ # co.1, Gruppe A, Group
91
+ # co.1, Gruppe B, Group
92
+
93
+
94
+
95
+ # caf.cl, Gruppe A, Group
96
+ # caf.cl, Gruppe B, Group
97
+ # caf.cl, Gruppe C, Group
98
+ # caf.cl, Gruppe D, Group
99
+
100
+
101
+ # uefa.cl, Gruppe A, Group
102
+ # uefa.cl, Gruppe B, Group
103
+ # uefa.cl, Gruppe C, Group
104
+ # uefa.cl, Gruppe D, Group
105
+ # uefa.cl, Gruppe E, Group
106
+ # uefa.cl, Gruppe F, Group
107
+ # uefa.cl, Gruppe G, Group
108
+ # uefa.cl, Gruppe H, Group
109
+
110
+ # uefa.el, Gruppe A, Group
111
+ # uefa.el, Gruppe B, Group
112
+ # uefa.el, Gruppe C, Group
113
+ # uefa.el, Gruppe D, Group
114
+ # uefa.el, Gruppe E, Group
115
+ # uefa.el, Gruppe F, Group
116
+ # uefa.el, Gruppe G, Group
117
+ # uefa.el, Gruppe H, Group
118
+
119
+ # uefa.conf, Gruppe A, Group
120
+ # uefa.conf, Gruppe B, Group
121
+ # uefa.conf, Gruppe C, Group
122
+ # uefa.conf, Gruppe D, Group
123
+ # uefa.conf, Gruppe E, Group
124
+ # uefa.conf, Gruppe F, Group
125
+ # uefa.conf, Gruppe G, Group
126
+ # uefa.conf, Gruppe H, Group
data/config/stages.csv CHANGED
@@ -1,64 +1,45 @@
1
1
  key, name1, name2,
2
2
 
3
- *, Meisterschaft, Playoffs - Championship
4
- *, Abstieg, Playoffs - Relegation
5
- *, Relegation, Playoffs - Relegation
3
+ *, Meisterschaft, Championship
4
+ *, Abstieg, Relegation
6
5
 
6
+ ## use Playoffs - Championship -- why? why not?
7
+ ## use Playoffs - Relegation -- why? why not?
7
8
 
8
- sco.1, Championship, Playoffs - Championship
9
- sco.1, Relegation', Playoffs - Relegation
10
9
 
11
-
12
- at.1, Meistergruppe, Playoffs - Championship
13
- at.1, Qualifikationsgruppe, Playoffs - Relegation
10
+ at.1, Meistergruppe, Championship
11
+ at.1, Qualifikationsgruppe, Relegation
14
12
  at.1, Playoff, Europa League Finals
15
13
 
16
14
 
17
- pl.1, Playoffs, Playoffs - Championship
18
- pl.2, Abstieg, Playoffs - Relegation
19
-
20
-
21
- sk.1, Meisterschaft, Playoffs - Championship
22
- sk.1, Abstieg, Playoffs - Relegation
15
+ sk.1, Meisterschaft, Championship
16
+ sk.1, Abstieg, Relegation
23
17
  sk.1, Europa League, Europa League Finals
24
18
 
25
19
 
26
- ro.1, Championship, Playoffs - Championship
27
- ro.1, Relegation, Playoffs - Relegation
28
-
29
- ru.1, Meisterschaft, Playoffs - Championship
30
- ru.1, Relegation, Playoffs - Relegation
31
-
32
-
33
- ua.1, Meisterschaft, Playoffs - Championship
34
- ua.1, Abstieg, Playoffs - Relegation
20
+ ua.1, Meisterschaft, Championship
21
+ ua.1, Abstieg, Relegation
35
22
  ua.1, Playoffs EL, Europa League Finals
36
23
 
37
24
 
38
- fi.1, Meisterschaft, Playoffs - Championship
39
- fi.1, Abstieg, Playoffs - Challenger
25
+ fi.1, Meisterschaft, Championship
26
+ fi.1, Abstieg, Relegation
40
27
  fi.1, Playoff EL, Europa League Finals
41
28
 
42
- dk.1, Meisterschaft, Playoffs - Championship
43
- dk.1, Abstieg, Playoffs - Relegation
29
+ dk.1, Meisterschaft, Championship
30
+ dk.1, Abstieg, Relegation
44
31
  dk.1, Europa League, Europa League Finals
45
32
 
46
33
 
47
- gr.1, Meisterschaft, Playoffs - Championship
48
- gr.1, Abstieg, Playoffs - Relegation
34
+ gr.1, Meisterschaft, Championship
35
+ gr.1, Abstieg, Relegation
49
36
  gr.1, Playoffs, Playoffs
50
37
  gr.1, Spiel um Platz 6, Match 6th Place
51
38
 
52
39
 
53
-
54
- mx.1, Apertura Playoffs, Apertura - Liguilla
55
- mx.1, Clausura Playoffs, Clausura - Liguilla
56
-
57
-
58
- kr.1, Meisterschaft, Playoffs - Championship
59
- kr.1, Abstieg, Playoffs - Relegation
60
-
61
-
62
40
  nz.1, Playoffs, Playoff Finals
63
41
 
64
42
 
43
+
44
+ ## mx.1, Apertura Playoffs, Apertura - Liguilla
45
+ ## mx.1, Clausura Playoffs, Clausura - Liguilla
@@ -31,13 +31,18 @@ def self.parse_score( score_str )
31
31
  et = ''
32
32
  pen = ''
33
33
 
34
+ ##
35
+ ## [085] 2021-10-21 | 22:00 | Metropolitanos FC | LALA FC | Aufg.
36
+ ## !! ERROR - unsupported score format >Aufg.< - sorry; maybe add a score error fix/patch
37
+ ## - handle with Aufg.
34
38
 
35
39
  if score_str == '---' ## in the future (no score yet) - was -:-
36
40
  ft = ''
37
41
  ht = ''
38
42
  elsif score_str == 'n.gesp.' || ## cancelled (british) / canceled (us)
39
43
  score_str == 'ausg.' || ## todo/check: change to some other status ????
40
- score_str == 'annull.' ## todo/check: change to some other status (see ie 2012) ????
44
+ score_str == 'annull.' || ## todo/check: change to some other status (see ie 2012) ????
45
+ score_str == 'Aufg.'
41
46
  ft = '(*)'
42
47
  ht = ''
43
48
  comments = 'cancelled'
@@ -172,13 +177,13 @@ def self.parse_score( score_str )
172
177
  puts "!! WARN - weird score n.V. only - >#{score_str}<"
173
178
  elsif score_str =~ /^([0-9]+) [ ]*-[ ]* ([0-9]+)
174
179
  [ ]*
175
- i\.E\.
180
+ (?: i\.E\. | n\.P\. )
176
181
  $/x
177
182
  pen = "#{$1}-#{$2}"
178
183
  et = ''
179
184
  ht = ''
180
185
  ft = ''
181
- puts "!! WARN - weird score i.E. only - >#{score_str}<"
186
+ puts "!! WARN - weird score i.E. (n.P.) only - >#{score_str}<"
182
187
  else
183
188
  puts "!! ERROR - unsupported score format >#{score_str}< - sorry; maybe add a score error fix/patch"
184
189
  exit 1