rsssf 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/Manifest.txt +39 -2
- data/README.md +67 -62
- data/Rakefile +2 -2
- data/config/groups_en.txt +44 -0
- data/config/rounds_en.txt +283 -0
- data/config/rounds_es.txt +20 -0
- data/config/rounds_misc.txt +7 -0
- data/lib/_cocos_.rb +158 -0
- data/lib/rsssf/convert/convert.rb +71 -0
- data/lib/rsssf/convert/errata.rb +103 -0
- data/lib/rsssf/convert/html_entities.rb +150 -0
- data/lib/rsssf/convert/html_to_txt/beautify_anchors.rb +96 -0
- data/lib/rsssf/convert/html_to_txt/make_heading.rb +70 -0
- data/lib/rsssf/convert/html_to_txt/remove_emails.rb +43 -0
- data/lib/rsssf/convert/html_to_txt/replace_a_href.rb +85 -0
- data/lib/rsssf/convert/html_to_txt/replace_a_name.rb +87 -0
- data/lib/rsssf/convert/html_to_txt/replace_heading.rb +76 -0
- data/lib/rsssf/convert/html_to_txt/replace_hr.rb +25 -0
- data/lib/rsssf/convert/html_to_txt.rb +247 -0
- data/lib/rsssf/download.rb +4 -135
- data/lib/rsssf/fmtfix/dates.rb +541 -0
- data/lib/rsssf/fmtfix/dates_helpers.rb +63 -0
- data/lib/rsssf/fmtfix/errata.rb +44 -0
- data/lib/rsssf/fmtfix/fmtfix-base.rb +68 -0
- data/lib/rsssf/fmtfix/fmtfix.rb +101 -0
- data/lib/rsssf/fmtfix/goals.rb +173 -0
- data/lib/rsssf/fmtfix/headers.rb +326 -0
- data/lib/rsssf/fmtfix/outline.rb +228 -0
- data/lib/rsssf/fmtfix/patch_headings.rb +141 -0
- data/lib/rsssf/fmtfix/rounds.rb +74 -0
- data/lib/rsssf/fmtfix/score.rb +92 -0
- data/lib/rsssf/fmtfix/tables.rb +316 -0
- data/lib/rsssf/fmtfix/topscorers.rb +50 -0
- data/lib/rsssf/page-find_schedule.rb +127 -0
- data/lib/rsssf/page-meta.rb +68 -0
- data/lib/rsssf/page.rb +89 -227
- data/lib/rsssf/parse_schedules.rb +34 -0
- data/lib/rsssf/prepare/convert-links.rb +77 -0
- data/lib/rsssf/prepare/convert-meta.rb +111 -0
- data/lib/rsssf/prepare/convert-navlines.rb +154 -0
- data/lib/rsssf/prepare/convert-postproc.rb +141 -0
- data/lib/rsssf/prepare/convert.rb +100 -0
- data/lib/rsssf/prepare/download.rb +40 -0
- data/lib/rsssf/project.rb +154 -0
- data/lib/rsssf/reports/page.rb +40 -8
- data/lib/rsssf/reports/schedule.rb +18 -55
- data/lib/rsssf/utils.rb +28 -17
- data/lib/rsssf/version.rb +5 -2
- data/lib/rsssf.rb +53 -13
- metadata +50 -9
- data/lib/rsssf/convert.rb +0 -495
- data/lib/rsssf/repo.rb +0 -144
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77eac4fd6af25c171a9367afb06db3461e923c25f567222638d96f0665ca242e
|
|
4
|
+
data.tar.gz: b996e7cb14c9fb945c7138d3bd92e6214f922bcb2baf5e35da41b8ea957ca6f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccc33fe06442b36b88724328ee1d5de5259bd4a8283b640b9e2372caea8895447a3074d14e0aaf49f752e47054dab5466b594f69e796d05b48b4b855ee2d2afe
|
|
7
|
+
data.tar.gz: 41c5fa46b0d0562ca026dfe8d9fb2448957db2a86fadfee856f6ff853b930fe8e8b8659438f32619d880836d0ee32533a4e1a07d35fcaea3edd41f2e93173157
|
data/CHANGELOG.md
CHANGED
data/Manifest.txt
CHANGED
|
@@ -2,11 +2,48 @@ CHANGELOG.md
|
|
|
2
2
|
Manifest.txt
|
|
3
3
|
README.md
|
|
4
4
|
Rakefile
|
|
5
|
+
config/groups_en.txt
|
|
6
|
+
config/rounds_en.txt
|
|
7
|
+
config/rounds_es.txt
|
|
8
|
+
config/rounds_misc.txt
|
|
9
|
+
lib/_cocos_.rb
|
|
5
10
|
lib/rsssf.rb
|
|
6
|
-
lib/rsssf/convert.rb
|
|
11
|
+
lib/rsssf/convert/convert.rb
|
|
12
|
+
lib/rsssf/convert/errata.rb
|
|
13
|
+
lib/rsssf/convert/html_entities.rb
|
|
14
|
+
lib/rsssf/convert/html_to_txt.rb
|
|
15
|
+
lib/rsssf/convert/html_to_txt/beautify_anchors.rb
|
|
16
|
+
lib/rsssf/convert/html_to_txt/make_heading.rb
|
|
17
|
+
lib/rsssf/convert/html_to_txt/remove_emails.rb
|
|
18
|
+
lib/rsssf/convert/html_to_txt/replace_a_href.rb
|
|
19
|
+
lib/rsssf/convert/html_to_txt/replace_a_name.rb
|
|
20
|
+
lib/rsssf/convert/html_to_txt/replace_heading.rb
|
|
21
|
+
lib/rsssf/convert/html_to_txt/replace_hr.rb
|
|
7
22
|
lib/rsssf/download.rb
|
|
23
|
+
lib/rsssf/fmtfix/dates.rb
|
|
24
|
+
lib/rsssf/fmtfix/dates_helpers.rb
|
|
25
|
+
lib/rsssf/fmtfix/errata.rb
|
|
26
|
+
lib/rsssf/fmtfix/fmtfix-base.rb
|
|
27
|
+
lib/rsssf/fmtfix/fmtfix.rb
|
|
28
|
+
lib/rsssf/fmtfix/goals.rb
|
|
29
|
+
lib/rsssf/fmtfix/headers.rb
|
|
30
|
+
lib/rsssf/fmtfix/outline.rb
|
|
31
|
+
lib/rsssf/fmtfix/patch_headings.rb
|
|
32
|
+
lib/rsssf/fmtfix/rounds.rb
|
|
33
|
+
lib/rsssf/fmtfix/score.rb
|
|
34
|
+
lib/rsssf/fmtfix/tables.rb
|
|
35
|
+
lib/rsssf/fmtfix/topscorers.rb
|
|
36
|
+
lib/rsssf/page-find_schedule.rb
|
|
37
|
+
lib/rsssf/page-meta.rb
|
|
8
38
|
lib/rsssf/page.rb
|
|
9
|
-
lib/rsssf/
|
|
39
|
+
lib/rsssf/parse_schedules.rb
|
|
40
|
+
lib/rsssf/prepare/convert-links.rb
|
|
41
|
+
lib/rsssf/prepare/convert-meta.rb
|
|
42
|
+
lib/rsssf/prepare/convert-navlines.rb
|
|
43
|
+
lib/rsssf/prepare/convert-postproc.rb
|
|
44
|
+
lib/rsssf/prepare/convert.rb
|
|
45
|
+
lib/rsssf/prepare/download.rb
|
|
46
|
+
lib/rsssf/project.rb
|
|
10
47
|
lib/rsssf/reports/page.rb
|
|
11
48
|
lib/rsssf/reports/schedule.rb
|
|
12
49
|
lib/rsssf/schedule.rb
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# rsssf - tools 'n' scripts for RSSSF (Rec.Sport.Soccer Statistics Foundation) archive data
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
* home :: [github.com/
|
|
5
|
-
* bugs :: [github.com/
|
|
4
|
+
* home :: [github.com/rsssf/scripts](https://github.com/rsssf/scripts)
|
|
5
|
+
* bugs :: [github.com/rsssf/scripts/issues](https://github.com/rsssf/scripts/issues)
|
|
6
6
|
* gem :: [rubygems.org/gems/rsssf](https://rubygems.org/gems/rsssf)
|
|
7
7
|
* rdoc :: [rubydoc.info/gems/rsssf](http://rubydoc.info/gems/rsssf)
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ Coritiba 2-1 Atlético/MG
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
### Download (and Cache
|
|
49
|
+
### Download (and Cache) Pages
|
|
50
50
|
|
|
51
51
|
To download (and cache) pages from the world wide web use:
|
|
52
52
|
|
|
@@ -59,9 +59,10 @@ Rsssf.download_page( 'https://rsssf.org/tablesb/braz2024.html',
|
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Note: Most pages on rsssf.org use the Windows-1252 (character) encoding.
|
|
62
|
-
To "auto-magically" convert to unicode (utf-8)
|
|
63
|
-
add the encoding option (default is `UTF-8`).
|
|
62
|
+
To "auto-magically" convert to unicode (utf-8)
|
|
63
|
+
add the encoding option (default is `UTF-8`).
|
|
64
64
|
|
|
65
|
+
<!--
|
|
65
66
|
Or as a convenience shortcut download (pre-configured table) pages by country code (e.g `eng` - England, `es` - Spain (España), `de` - Germany (Deutschland), `br` - Brazil (Brasil) etc.)
|
|
66
67
|
and season (e.g. `2023/24` or `2024` etc.)
|
|
67
68
|
|
|
@@ -70,17 +71,18 @@ Rsssf.download_table( 'eng', season: '2023/24' )
|
|
|
70
71
|
|
|
71
72
|
Rsssf.download_table( 'br', season: '2024' )
|
|
72
73
|
```
|
|
74
|
+
-->
|
|
73
75
|
|
|
74
76
|
|
|
75
|
-
Note: The rsssf machinery uses a built-in web cache. All downloads get "auto-magically" cached (in `./cache/rsssf.org`).
|
|
77
|
+
Note: The rsssf machinery uses a built-in (local) web cache. All downloads get "auto-magically" cached (in `./cache/rsssf.org`).
|
|
76
78
|
|
|
77
79
|
|
|
78
80
|
|
|
79
|
-
### Working with Pages
|
|
81
|
+
### Working with Pages (from .HTML to .TXT)
|
|
80
82
|
|
|
81
83
|
|
|
82
|
-
Note: The `RsssfPage` machinery
|
|
83
|
-
from hypertext (
|
|
84
|
+
Note: The `RsssfPage` machinery lets you convert rsssf archive pages
|
|
85
|
+
from hypertext (.html) to plain text (.txt) e.g.
|
|
84
86
|
|
|
85
87
|
```
|
|
86
88
|
<hr>
|
|
@@ -113,7 +115,7 @@ will become
|
|
|
113
115
|
‹Conference›
|
|
114
116
|
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
115
117
|
|
|
116
|
-
|
|
118
|
+
==== Premier League
|
|
117
119
|
|
|
118
120
|
|
|
119
121
|
Final Table:
|
|
@@ -125,97 +127,100 @@ Final Table:
|
|
|
125
127
|
```
|
|
126
128
|
|
|
127
129
|
|
|
128
|
-
### Working with Repos
|
|
129
130
|
|
|
130
|
-
|
|
131
|
+
Tip - See <https://github.com/rsssf/tables>
|
|
132
|
+
for a public online copy / mirror of converted
|
|
133
|
+
tables in .txt (preserving the original "ad-hoc" formats).
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
To fetch pages from the world wide web for many seasons in batch use
|
|
139
|
+
a (tabular) datafile in the comma-separted values (.csv) format.
|
|
131
140
|
|
|
132
141
|
Step 1: List all archive pages
|
|
133
142
|
|
|
134
|
-
In
|
|
143
|
+
In `eng.csv` list all archive pages to fetch. Example:
|
|
144
|
+
|
|
135
145
|
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
``` csv
|
|
147
|
+
season, page, encoding
|
|
148
|
+
2020/21, tablese/eng2021.html, windows-1252
|
|
149
|
+
2021/22, tablese/eng2022.html, windows-1252
|
|
150
|
+
2022/23, tablese/eng2023.html, windows-1252
|
|
151
|
+
2023/24, tablese/eng2024.html, windows-1252
|
|
152
|
+
2024/25, tablese/eng2025.html, windows-1252
|
|
142
153
|
```
|
|
143
154
|
|
|
144
|
-
Step 2:
|
|
155
|
+
Step 2: Download all archive pages
|
|
145
156
|
|
|
146
157
|
Use:
|
|
147
158
|
|
|
148
159
|
``` ruby
|
|
149
|
-
|
|
150
|
-
repo.fetch_pages
|
|
151
|
-
```
|
|
160
|
+
pages = read_csv( './eng.csv')
|
|
152
161
|
|
|
153
|
-
|
|
154
|
-
Use:
|
|
162
|
+
Rsssf::Prep.download_pages( pages )
|
|
155
163
|
|
|
156
|
-
|
|
157
|
-
repo.make_pages_report
|
|
158
|
-
```
|
|
164
|
+
## convert from .html to .txt
|
|
159
165
|
|
|
160
|
-
|
|
166
|
+
Rsssf::Prep.convert_pages( pages, outdir: './tables' )
|
|
167
|
+
```
|
|
161
168
|
|
|
162
169
|
|
|
163
|
-
football.db RSSSF Archive Data Summary for England (and Wales)
|
|
164
170
|
|
|
165
|
-
_Last Update: 2015-11-26 18:22:22 +0200_
|
|
166
171
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
| 2013-14 | [eng2014.txt](https://github.com/rsssf/eng-england/blob/master/tables/eng2014.txt) | Ian King and Karel Stokkermans | 5 Feb 2015 | 1254 (34294) | Premier League, Cup Tournaments, Championship, Division 1, Division 2, Conference |
|
|
171
|
-
| 2012-13 | [eng2013.txt](https://github.com/rsssf/eng-england/blob/master/tables/eng2013.txt) | Karel Stokkermans | 5 Feb 2015 | 1269 (34531) | Premiership, Cup Tournaments, Championship, Division 1, Division 2, Conference |
|
|
172
|
-
| 2011-12 | [eng2012.txt](https://github.com/rsssf/eng-england/blob/master/tables/eng2012.txt) | Karel Stokkermans | 5 Feb 2015 | 691 (21925) | Premiership, Cup Tournaments, Championship, Division 1, Division 2, Conference |
|
|
173
|
-
| 2010-11 | [eng2011.txt](https://github.com/rsssf/eng-england/blob/master/tables/eng2011.txt) | Ian King, Karel Stokkermans and Jan Schoenmakers | 5 Feb 2015 | 959 (37393) | Premiership, Cup Tournaments, Championship, Division 1, Division 2, Conference |
|
|
172
|
+
For more and the latest news 'n' updates
|
|
173
|
+
incl. how to mirror the rsssf.org website (all 40000+ pages),
|
|
174
|
+
see the [`/scripts` source repo »](https://github.com/rsssf/scripts)
|
|
174
175
|
|
|
175
176
|
|
|
176
177
|
That's it.
|
|
177
178
|
|
|
178
179
|
|
|
179
|
-
### Preparing Archive Pages for SQL Database Imports (e.g. football.db)
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### Preparing Archive Pages for SQL Database Imports
|
|
184
|
+
|
|
185
|
+
Note: The rsssf machinery includes helpers
|
|
186
|
+
that try the best to convert the "ad-hoc" rsssf formats into
|
|
187
|
+
the structured Football.TXT format but expect no miracles
|
|
188
|
+
and fix any remaining errors "by hand"
|
|
189
|
+
or with your own little search & replace scripts
|
|
190
|
+
or why not with
|
|
191
|
+
the help of the latest and greatest large language models (LLMs)?
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
To split-up the all-in-one page and break-out sections
|
|
195
|
+
such as the Premier League or FA Cup from the `eng2015.txt`, for example,
|
|
196
|
+
use:
|
|
185
197
|
|
|
186
198
|
``` ruby
|
|
187
|
-
page = RsssfPage.
|
|
199
|
+
page = RsssfPage.read_txt( './pages/eng2015.txt')
|
|
188
200
|
|
|
189
201
|
schedule = page.find_schedule( header: 'Premier League') ## returns RsssfSchedule obj
|
|
190
|
-
schedule.save( './1-premierleague.txt' )
|
|
202
|
+
schedule.save( './2014-15/1-premierleague.txt' )
|
|
191
203
|
|
|
192
|
-
schedule = page.find_schedule( header: 'FA Cup'
|
|
193
|
-
schedule.save( './facup.txt' )
|
|
204
|
+
schedule = page.find_schedule( header: 'FA Cup' )
|
|
205
|
+
schedule.save( './2014-15/facup.txt' )
|
|
194
206
|
```
|
|
195
207
|
|
|
196
208
|
|
|
197
209
|
|
|
198
|
-
## RSSSF Datasets
|
|
199
210
|
|
|
200
|
-
See the rsssf github org for
|
|
211
|
+
Tip: See the rsssf github org for sample pages
|
|
212
|
+
with format autofixes applied including:
|
|
201
213
|
|
|
202
|
-
- [
|
|
203
|
-
- [`
|
|
204
|
-
- [`
|
|
205
|
-
- [
|
|
206
|
-
- [
|
|
214
|
+
- [`/england`](https://github.com/rsssf/clubs/tree/master/england) - rsssf archive data for England - Premier League, Championship, FA Cup etc.
|
|
215
|
+
- [`/germany`](https://github.com/rsssf/clubs/tree/master/germany) - rsssf archive data for Germany (Deutschland) - Deutsche Bundesliga, 2. Bundesliga, 3. Liga, DFB Pokal etc.
|
|
216
|
+
- [`/spain`](https://github.com/rsssf/clubs/tree/master/spain) - rsssf archive data for España (Spain) - Primera División / La Liga, Copa de Rey, etc.
|
|
217
|
+
- [`/austria`](https://github.com/rsssf/clubs/tree/master/austria) - rsssf archive data for Austria (Österreich) - Österr. Bundesliga, Erste Liga, ÖFB Pokal etc.
|
|
218
|
+
- [`/brazil`](https://github.com/rsssf/clubs/tree/master/brazil) - rsssf archive data for Brazil (Brasil) - Campeonato Brasileiro Série A / Brasileirão etc.
|
|
207
219
|
- and more
|
|
208
220
|
|
|
209
221
|
|
|
222
|
+
|
|
210
223
|
## License
|
|
211
224
|
|
|
212
225
|
The `rsssf` scripts are dedicated to the public domain.
|
|
213
226
|
Use it as you please with no restrictions whatsoever.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
## Questions? Comments?
|
|
217
|
-
|
|
218
|
-
Send them along to the
|
|
219
|
-
[Open Sports & Friends Forum/Mailing List](http://groups.google.com/group/opensport).
|
|
220
|
-
Thanks!
|
|
221
|
-
|
data/Rakefile
CHANGED
|
@@ -8,7 +8,7 @@ Hoe.spec 'rsssf' do
|
|
|
8
8
|
self.summary = "rsssf - tools 'n' scripts for RSSSF (Rec.Sport.Soccer Statistics Foundation) archive data"
|
|
9
9
|
self.description = summary
|
|
10
10
|
|
|
11
|
-
self.urls = { home: 'https://github.com/
|
|
11
|
+
self.urls = { home: 'https://github.com/rsssf/scripts' }
|
|
12
12
|
|
|
13
13
|
self.author = 'Gerald Bauer'
|
|
14
14
|
self.email = 'gerald.bauer@gmail.com'
|
|
@@ -20,7 +20,7 @@ Hoe.spec 'rsssf' do
|
|
|
20
20
|
self.extra_deps = [
|
|
21
21
|
['cocos'],
|
|
22
22
|
['season-formats'],
|
|
23
|
-
['
|
|
23
|
+
['webget'],
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
##
|
|
2
|
+
# groups e.g.
|
|
3
|
+
# zones e.g.
|
|
4
|
+
# sections e.g.
|
|
5
|
+
# conferences e.g.
|
|
6
|
+
##
|
|
7
|
+
|
|
8
|
+
## fix - move to groups.txt !!!
|
|
9
|
+
## groups
|
|
10
|
+
|
|
11
|
+
## e.g group a, group b,
|
|
12
|
+
## group 1, group 2,
|
|
13
|
+
## group i, group ii, etc.
|
|
14
|
+
##
|
|
15
|
+
## add a1,b1, etc too - why? why not?
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## make build-in - why? why not?
|
|
19
|
+
|
|
20
|
+
Group [ ] ( [a-z] \
|
|
21
|
+
| \d{1,2} \
|
|
22
|
+
| i | ii | iii | iv \
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
## for groups and legs
|
|
26
|
+
## use ▪▪ (double) - why? why not?
|
|
27
|
+
or zones (like groups)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
###
|
|
31
|
+
## mls/usa
|
|
32
|
+
Eastern·conference
|
|
33
|
+
Central·conference
|
|
34
|
+
Western·conference
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
######
|
|
38
|
+
## sco(tland)
|
|
39
|
+
|
|
40
|
+
North·section
|
|
41
|
+
South·section
|
|
42
|
+
Western·Isles·section
|
|
43
|
+
Shetland·Island·section
|
|
44
|
+
Orkney·Isles·section
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
##
|
|
2
|
+
# rounds in english (en)
|
|
3
|
+
#
|
|
4
|
+
#
|
|
5
|
+
# note: limited support for regex syntax supported
|
|
6
|
+
# use ?
|
|
7
|
+
# use () for groups
|
|
8
|
+
# and use |
|
|
9
|
+
|
|
10
|
+
# note - leading and trailing spaces get removed
|
|
11
|
+
# and inline spaces squished (reduced to one)
|
|
12
|
+
|
|
13
|
+
##
|
|
14
|
+
## note - inline spaces get translated to [] e.g.
|
|
15
|
+
### UNLESS (IF NOT) [] present in line!!!
|
|
16
|
+
## 1/16 finals => 1/16 [ ] finals
|
|
17
|
+
## 1/8 finals? => 1/8 [ ] finals?
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
##
|
|
21
|
+
## note - to processing modes
|
|
22
|
+
## if regex metachars found - line is regex!!
|
|
23
|
+
## if no regex metachars found - line is plain and get preprocesed
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
##
|
|
27
|
+
## check how to support here
|
|
28
|
+
## Round [ ]{1,2} \d{1,2} ## e.g. round 1, round 2, etc.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
##
|
|
32
|
+
## note - always remove leading & trailing spaces
|
|
33
|
+
## and squish inline spaces
|
|
34
|
+
##
|
|
35
|
+
## note - group (...) gets changed to
|
|
36
|
+
## non-capturing group (?: ...)
|
|
37
|
+
##
|
|
38
|
+
## use \ for line-continuation!!!
|
|
39
|
+
#
|
|
40
|
+
#
|
|
41
|
+
## optional shortcut
|
|
42
|
+
## replace Middle Dot (·) Unicode: U+00B7 or
|
|
43
|
+
## Open Box (␣) Unicode: U+2423 or
|
|
44
|
+
## with [ ]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
$ordinal = ( First | Second | Third | Fourth | Fifth \
|
|
48
|
+
| 1st | 2nd | 3rd | 4th | 5th )
|
|
49
|
+
|
|
50
|
+
$opt_replay = ( [ ] replays? )?
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## e.g. Playoff, Playoffs, Play-off, Play-offs
|
|
54
|
+
$playoff = play-?offs?
|
|
55
|
+
|
|
56
|
+
## e.g. Match, Matches
|
|
57
|
+
$match = match(es)?
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Preliminary·round
|
|
63
|
+
|
|
64
|
+
## e.g. First round, Second round, ...
|
|
65
|
+
$ordinal [ ] ( round $opt_replay \
|
|
66
|
+
| phase )
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Round·one
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## e.g. 1/8 finals, 8th finals...
|
|
74
|
+
( 1/32 \
|
|
75
|
+
| 1/16 | 16th \
|
|
76
|
+
| 1/8 | 8th \
|
|
77
|
+
| 1/4 \
|
|
78
|
+
| 1/2 ) [ ] finals? $opt_replay
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## e.g. Eight-finals, Eight finals, Eightfinals, ...
|
|
82
|
+
( Eight \
|
|
83
|
+
| Quarter \
|
|
84
|
+
| Semi ) [ -]? finals? $opt_replay
|
|
85
|
+
|
|
86
|
+
## short-forms
|
|
87
|
+
Semis
|
|
88
|
+
Quarters
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## e.g. Round of 16, Last 16, ...
|
|
92
|
+
(Round·of | Last ) [ ] ( 4 | 8 | 16 | 32)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## e.g. fifth place, fifth-place, 5th place
|
|
98
|
+
$fifthplace = ( fifth | 5th ) [ -] place
|
|
99
|
+
|
|
100
|
+
$fifthplace [ ] ( match | final | play[ -]?off )
|
|
101
|
+
Match·for [ ] $fifthplace
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## e.g. third place, third-place, 3rd place
|
|
105
|
+
$thirdplace = ( third | 3rd ) [ -] place
|
|
106
|
+
|
|
107
|
+
$thirdplace [ ] ( match | final | play[ -]?off )
|
|
108
|
+
Match·for [ ] $thirdplace
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
Finals? $opt_replay
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
###
|
|
115
|
+
# more
|
|
116
|
+
|
|
117
|
+
Final [ ] (round | group | pool)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## e.g. Minor Semifinals
|
|
124
|
+
(Minor | Major) [ ] Semi [ -]? finals?
|
|
125
|
+
|
|
126
|
+
Preliminary·final
|
|
127
|
+
Final·series
|
|
128
|
+
Grand·final
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Conference·wild·card·round
|
|
134
|
+
Wild·card·games
|
|
135
|
+
|
|
136
|
+
(Eastern | Western) [ ] conference [ ] quarter [ -]? finals
|
|
137
|
+
(Eastern | Western) [ ] semi [ -]? finals
|
|
138
|
+
(Eastern | Western) [ ] conference·final
|
|
139
|
+
|
|
140
|
+
Conference·quarterfinals
|
|
141
|
+
Conference·semifinals
|
|
142
|
+
Conference·finals
|
|
143
|
+
|
|
144
|
+
Divisional·finals
|
|
145
|
+
Championship·final
|
|
146
|
+
|
|
147
|
+
## used in msl/usa for "grand final"
|
|
148
|
+
## e.g. MLS cup, MLS cup final, MLS cup 2010, ...
|
|
149
|
+
MLS·cup ([ ] final)? ([ ] \d{4})?
|
|
150
|
+
|
|
151
|
+
### move to stage?
|
|
152
|
+
## use/replace w/ generic Qualifaction <name> - why? why not?
|
|
153
|
+
Qualification·MLS
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
Super [ ] semi [ -]? final
|
|
157
|
+
|
|
158
|
+
Super [ ]? cup [ ] final
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
Deciding·match
|
|
162
|
+
Decider
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## in jp
|
|
167
|
+
$playoff [ ] round
|
|
168
|
+
Prime [ ] round
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## in it (cup)
|
|
172
|
+
## with (no extra time) flag/note
|
|
173
|
+
## e.g. Round 1 (no extra time)
|
|
174
|
+
|
|
175
|
+
Round [ ] (1|2|3) [ ] \( no [ ] extra [ ] time \)
|
|
176
|
+
Quarter [ -]? finals? [ ] \( no [ ] extra [ ] time \)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
###
|
|
183
|
+
# moved matches - find a better name?
|
|
184
|
+
# nachtragspiele (de) in en ??
|
|
185
|
+
|
|
186
|
+
## e.g. Moved matches,
|
|
187
|
+
## Moved match, ..
|
|
188
|
+
Moved·$match
|
|
189
|
+
|
|
190
|
+
## e.g. Match from round 26,
|
|
191
|
+
## Matches from round 26
|
|
192
|
+
$match·from [ ] round [ ] \d{1,2}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## standalone replay
|
|
196
|
+
Replays?
|
|
197
|
+
|
|
198
|
+
## e.g. Replayed match,
|
|
199
|
+
## Replayed matches
|
|
200
|
+
Replayed·$match
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
#############
|
|
207
|
+
## add stages
|
|
208
|
+
|
|
209
|
+
## e.g. First stage, Second stage, ...
|
|
210
|
+
$ordinal [ ] stage
|
|
211
|
+
|
|
212
|
+
( Regular \
|
|
213
|
+
| Group \
|
|
214
|
+
| League \
|
|
215
|
+
| Playoff ) [ ] stage
|
|
216
|
+
|
|
217
|
+
Knock-?out·stage
|
|
218
|
+
|
|
219
|
+
Regular·season
|
|
220
|
+
|
|
221
|
+
Tournament·proper
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
#####
|
|
226
|
+
## play-offs & play-ins
|
|
227
|
+
|
|
228
|
+
Championship [ ] $playoff
|
|
229
|
+
Europa·league [ ] $playoff
|
|
230
|
+
Conference·league [ ] $playoff
|
|
231
|
+
|
|
232
|
+
Promotion [ ] ($playoff | $match)
|
|
233
|
+
Relegation [ ] ($playoff | $match)
|
|
234
|
+
Promotion/relegation [ ] ($playoff | $match)
|
|
235
|
+
Promotion/relegation [ ] ($playoff | $match) [ ] \
|
|
236
|
+
( 1st/2nd \
|
|
237
|
+
| 2nd/3rd \
|
|
238
|
+
| 3rd/4th) [ ] level
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
Relegation·playout
|
|
242
|
+
Play-?out
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
## e.g. Play-in round A, Play-in round B, Play-in round A-B
|
|
246
|
+
## note - escape for literal () required!!
|
|
247
|
+
|
|
248
|
+
Play-in·round [ ] ( A | B | A-B )
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## standalone playoff
|
|
252
|
+
## e.g Playoff, Playoff 1, Playoff 2
|
|
253
|
+
|
|
254
|
+
$playoff
|
|
255
|
+
$playoff [ ] (1 | 2)?
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
#############
|
|
261
|
+
## standalone legs
|
|
262
|
+
|
|
263
|
+
## e.g. First legs
|
|
264
|
+
## Second leg replay
|
|
265
|
+
$ordinal [ ] legs? $opt_replay
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
Third·leg·minigame # in us
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## used in mexico
|
|
5
|
+
|
|
6
|
+
Playoffs [ ] \( Liguilla \)
|
|
7
|
+
|
|
8
|
+
Recalificación
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## used in argentina
|
|
12
|
+
|
|
13
|
+
Round·of·64·-·32·avos·de·final
|
|
14
|
+
Round·of·32·-·16·avos·de·final
|
|
15
|
+
Round·of·16·-·Octavos·de·Final
|
|
16
|
+
Quarter·finals·-·Cuartos·de·final
|
|
17
|
+
Semi·finals·-·Semifinales
|
|
18
|
+
|
|
19
|
+
Primera·fase·de·zonas·-·Phase·of·groups
|
|
20
|
+
|