fifa 2024.9.21 → 2024.9.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/LICENSE.md +116 -0
- data/Manifest.txt +11 -1
- data/NOTES.md +162 -10
- data/README.md +5 -3
- data/Rakefile +1 -1
- data/config/africa/countries.txt +87 -0
- data/config/asia/countries.txt +64 -0
- data/config/caribbean/countries.txt +58 -0
- data/config/central-america/countries.txt +12 -0
- data/config/countries_history.txt +46 -0
- data/config/europe/countries.txt +117 -0
- data/config/middle-east/countries.txt +31 -0
- data/config/north-america/countries.txt +12 -0
- data/config/pacific/countries.txt +49 -0
- data/config/south-america/countries.txt +23 -0
- data/lib/fifa/country_index.rb +9 -3
- data/lib/fifa/version.rb +1 -1
- data/lib/fifa.rb +13 -9
- metadata +25 -5
- data/config/countries.txt +0 -522
@@ -0,0 +1,117 @@
|
|
1
|
+
=========================================
|
2
|
+
== Europe
|
3
|
+
# Note: The UEFA member country Kazachstan from Asia is listed in Asia.
|
4
|
+
# Note: The UEFA member country Israel from Asia is listed in Middle East.
|
5
|
+
|
6
|
+
al Albania, ALB, fifa › uefa
|
7
|
+
ad Andorra, AND, fifa › uefa
|
8
|
+
at Austria, AUT, fifa › uefa
|
9
|
+
| Österreich [de]
|
10
|
+
|
11
|
+
|
12
|
+
by Belarus, BLR, fifa › uefa
|
13
|
+
be Belgium, BEL, fifa › uefa
|
14
|
+
ba Bosnia and Herzegovina, BIH, fifa › uefa
|
15
|
+
| Bosnia-Herzegovina | Bosnia | Bosnia-Herz. # add Bosnia Herzegovina?
|
16
|
+
bg Bulgaria, BUL, fifa › uefa
|
17
|
+
|
18
|
+
hr Croatia, CRO, fifa › uefa
|
19
|
+
| Hrvatska [hr]
|
20
|
+
cy Cyprus, CYP, fifa › uefa
|
21
|
+
cz Czech Republic, CZE, fifa › uefa
|
22
|
+
| Czechia
|
23
|
+
|
24
|
+
dk Denmark, DEN, fifa › uefa
|
25
|
+
|
26
|
+
ee Estonia, EST, fifa › uefa
|
27
|
+
es Spain, ESP, fifa › uefa
|
28
|
+
| España [es]
|
29
|
+
|
30
|
+
fi Finland, FIN, fifa › uefa
|
31
|
+
fr France, FRA, fifa › uefa
|
32
|
+
|
33
|
+
de Germany, GER, fifa › uefa
|
34
|
+
| Deutschland [de]
|
35
|
+
gr Greece, GRE, fifa › uefa
|
36
|
+
|
37
|
+
hu Hungary, HUN, fifa › uefa
|
38
|
+
|
39
|
+
is Iceland, ISL, fifa › uefa
|
40
|
+
it Italy, ITA, fifa › uefa
|
41
|
+
ie Ireland, IRL, fifa › uefa
|
42
|
+
| Republic of Ireland
|
43
|
+
|
44
|
+
lv Latvia, LVA, fifa › uefa
|
45
|
+
| Latvija
|
46
|
+
li Liechtenstein, LIE, fifa › uefa
|
47
|
+
lt Lithuania, LTU, fifa › uefa
|
48
|
+
lu Luxembourg, LUX, fifa › uefa
|
49
|
+
|
50
|
+
## note: country renamed to North Macedonia in February 2019
|
51
|
+
## keeps same fifa code - move Macedonia to history - why? why not?
|
52
|
+
mk North Macedonia, MKD, fifa › uefa
|
53
|
+
| Republic of North Macedonia
|
54
|
+
| Macedonia | FYR Macedonia | Macedonia FYR
|
55
|
+
|
56
|
+
mt Malta, MLT, fifa › uefa
|
57
|
+
md Moldova, MDA, fifa › uefa
|
58
|
+
me Montenegro, MNE, fifa › uefa
|
59
|
+
|
60
|
+
nl Netherlands, NED, fifa › uefa
|
61
|
+
no Norway, NOR, fifa › uefa
|
62
|
+
|
63
|
+
pl Poland, POL, fifa › uefa
|
64
|
+
pt Portugal, POR, fifa › uefa
|
65
|
+
|
66
|
+
ro Romania, ROU, fifa › uefa
|
67
|
+
ru Russia, RUS, fifa › uefa
|
68
|
+
|
69
|
+
sm San Marino, SMR, fifa › uefa
|
70
|
+
rs Serbia, SRB, fifa › uefa
|
71
|
+
sk Slovakia, SVK, fifa › uefa
|
72
|
+
si Slovenia, SVN, fifa › uefa
|
73
|
+
se Sweden, SWE, fifa › uefa
|
74
|
+
ch Switzerland, SUI, fifa › uefa
|
75
|
+
| Confoederatio Helvetica
|
76
|
+
|
77
|
+
tr Turkey, TUR, fifa › uefa
|
78
|
+
ua Ukraine, UKR, fifa › uefa
|
79
|
+
|
80
|
+
xk Kosovo, KVX, fifa › uefa # -- note: Kosovo is not listed as an ISO standard country. The unofficial 2 and 3-digit codes are used by the European Commission and others until Kosovo is assigned an ISO code
|
81
|
+
| KOS # note: KOS used by UEFA, KVX by FIFA (use FIFA code for now)
|
82
|
+
|
83
|
+
## south caucasus
|
84
|
+
## - add to middle east?
|
85
|
+
|
86
|
+
am Armenia, ARM, fifa › uefa
|
87
|
+
az Azerbaijan, AZE, fifa › uefa
|
88
|
+
ge Georgia, GEO, fifa › uefa
|
89
|
+
|
90
|
+
|
91
|
+
# Territories & Dependencies
|
92
|
+
fo Faroe Islands › DK, FRO, fifa › uefa
|
93
|
+
gi Gibraltar › UK, GIB, fifa › uefa
|
94
|
+
|
95
|
+
nkr Artsakh › AZ, NKR # note: NOT fifa or uefa member
|
96
|
+
bsq Basque Country › ES, BSQ # note: NOT fifa or uefa member
|
97
|
+
cat Catalonia › ES, CAT # note: NOT fifa or uefa member
|
98
|
+
gal Galicia › ES, GAL # note: NOT fifa or uefa member
|
99
|
+
|
100
|
+
## note: uses four-letter codes!
|
101
|
+
trnc Northern Cyprus › CY, TRNC # note: NOT fifa or uefa member
|
102
|
+
|
103
|
+
## not members
|
104
|
+
# - Great Britain - only all its member e.g. England/Wales/Scotland/Northern Irland
|
105
|
+
uk Great Britain, GBR # note: NOT fifa or uefa member
|
106
|
+
eng England › UK, ENG, fifa › uefa
|
107
|
+
wal Wales › UK, WAL, fifa › uefa
|
108
|
+
sco Scotland › UK, SCO, fifa › uefa
|
109
|
+
nir Northern Ireland › UK, NIR, fifa › uefa
|
110
|
+
| N. Ireland
|
111
|
+
|
112
|
+
## irregular codes
|
113
|
+
va Vatican City, VAT ## no "official" fifa code - listed in "irregular" codes
|
114
|
+
| Vatican
|
115
|
+
mc Monaco, MCO ## no "official" fifa code - listed in "irregular" codes
|
116
|
+
|
117
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
==========================================
|
2
|
+
== Middle East
|
3
|
+
|
4
|
+
# note: israel is listed here (uefa member)
|
5
|
+
|
6
|
+
|
7
|
+
### Arabian Peninsula
|
8
|
+
bh Bahrain, BHR, fifa › afc › waff
|
9
|
+
kw Kuwait, KUW, fifa › afc › waff
|
10
|
+
om Oman, OMA, fifa › afc › waff
|
11
|
+
qa Qatar, QAT, fifa › afc › waff
|
12
|
+
sa Saudi Arabia, KSA, fifa › afc › waff
|
13
|
+
ae United Arab Emirates, UAE, fifa › afc › waff
|
14
|
+
| UA Emirates
|
15
|
+
ye Yemen, YEM, fifa › afc › waff
|
16
|
+
|
17
|
+
|
18
|
+
### Fertile Crescent
|
19
|
+
iq Iraq, IRQ, fifa › afc › waff
|
20
|
+
il Israel, ISR, fifa › uefa # note: was formerly a member of AFC (1954–1974); joined UEFA in 1994
|
21
|
+
jo Jordan, JOR, fifa › afc › waff
|
22
|
+
lb Lebanon, LIB, fifa › afc › waff
|
23
|
+
ps Palestine, PLE, fifa › afc › waff
|
24
|
+
| Palestinian Territories
|
25
|
+
sy Syria, SYR, fifa › afc › waff
|
26
|
+
|
27
|
+
|
28
|
+
### Iranian Plateau
|
29
|
+
ir Iran, IRN, fifa › afc › cafa # note: NOT waff member
|
30
|
+
| IR Iran | Islamic Republic of Iran
|
31
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
==================================
|
2
|
+
== North America
|
3
|
+
|
4
|
+
ca Canada, CAN, fifa › concacaf › nafu
|
5
|
+
us United States, USA, fifa › concacaf › nafu
|
6
|
+
mx Mexico, MEX, fifa › concacaf › nafu
|
7
|
+
| México [es]
|
8
|
+
|
9
|
+
# Territories & Dependencies
|
10
|
+
bm Bermuda › UK, BER, fifa › concacaf › cfu
|
11
|
+
## check alt old? code BMU - in use??
|
12
|
+
gl Greenland › DK, GRL
|
@@ -0,0 +1,49 @@
|
|
1
|
+
==============================================
|
2
|
+
== Pacific ## Oceania & Australia
|
3
|
+
|
4
|
+
au Australia, AUS, fifa › afc › aff # formerly a member of OFC (1966–2006)
|
5
|
+
|
6
|
+
### Melanesia
|
7
|
+
pg Papua New Guinea, PNG, fifa › ofc
|
8
|
+
| Papua N.G.
|
9
|
+
fj Fiji, FIJ, fifa › ofc
|
10
|
+
sb Solomon Islands, SOL, fifa › ofc
|
11
|
+
| Solomon Isl.
|
12
|
+
vu Vanuatu, VAN, fifa › ofc
|
13
|
+
|
14
|
+
|
15
|
+
### Micronesia
|
16
|
+
pw Palau, PLW # note: NOT fifa member, NOT ofc member
|
17
|
+
# Listed as associate member of the OFC in 2002 and again in 2006. It is unclear whether Palau is still associated with the confederation
|
18
|
+
fm Micronesia, FSM # note: NOT fifa member, NOT ofc member
|
19
|
+
| Federated States of Micronesia
|
20
|
+
ki Kiribati, KIR, ofc # note: NOT fifa member
|
21
|
+
|
22
|
+
|
23
|
+
### Polynesia
|
24
|
+
nz New Zealand, NZL, fifa › ofc # was formerly a member of AFC (1964–1966)
|
25
|
+
ws Samoa, SAM, fifa › ofc
|
26
|
+
to Tonga, TGA, fifa › ofc
|
27
|
+
tv Tuvalu, TUV, ofc # note: NOT fifa member
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
# Territories & Dependencies
|
32
|
+
|
33
|
+
pf Tahiti › FR, TAH, fifa › ofc # todo/check: use French Polynesia (FR) as name - why? why not?
|
34
|
+
| French Polynesia # note: Tahiti, which is located within the Society Islands, is the most populous island, having close to 69% of the population of French Polynesia as of 2017.
|
35
|
+
nc New Caledonia › FR, NCL, fifa › ofc
|
36
|
+
|
37
|
+
as American Samoa › US, ASA, fifa › ofc
|
38
|
+
| Am. Samoa
|
39
|
+
gu Guam › US, GUM, fifa › afc › eaff
|
40
|
+
mp Northern Mariana Islands › US, NMI, afc › eaff # note: NOT fifa member -- was formerly a member of OFC (2005–2009)
|
41
|
+
|
42
|
+
ck Cook Islands › NZ, COK, fifa › ofc
|
43
|
+
nu Niue › NZ, NIU, ofc # note: NOT fifa member
|
44
|
+
|
45
|
+
|
46
|
+
## More Irregular FIFA codes
|
47
|
+
# - Marshall Islands
|
48
|
+
# - Nauru
|
49
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
==================================
|
2
|
+
== South America
|
3
|
+
|
4
|
+
ar Argentina, ARG, fifa › conmebol
|
5
|
+
bo Bolivia, BOL, fifa › conmebol
|
6
|
+
br Brazil, BRA, fifa › conmebol
|
7
|
+
cl Chile, CHI, fifa › conmebol
|
8
|
+
co Colombia, COL, fifa › conmebol
|
9
|
+
ec Ecuador, ECU, fifa › conmebol
|
10
|
+
py Paraguay, PAR, fifa › conmebol
|
11
|
+
pe Peru, PER, fifa › conmebol
|
12
|
+
uy Uruguay, URU, fifa › conmebol
|
13
|
+
ve Venezuela, VEN, fifa › conmebol
|
14
|
+
|
15
|
+
|
16
|
+
# NB: guyana, suriname n french guiana
|
17
|
+
# are part of north/central & caribbean according to fifa/concacaf
|
18
|
+
|
19
|
+
gy Guyana, GUY, fifa › concacaf › cfu
|
20
|
+
sr Suriname, SUR, fifa › concacaf › cfu
|
21
|
+
|
22
|
+
gf French Guiana › FR, GUF, concacaf › cfu # note: NOT fifa member
|
23
|
+
## todo: check alternative (old?) code GYF for French Guiana ??
|
data/lib/fifa/country_index.rb
CHANGED
@@ -5,6 +5,15 @@ module Fifa
|
|
5
5
|
## built-in countries for (quick starter) auto-add
|
6
6
|
class CountryIndex
|
7
7
|
|
8
|
+
def self.read( *paths )
|
9
|
+
recs = []
|
10
|
+
paths.each do |path|
|
11
|
+
recs += CountryReader.read( path )
|
12
|
+
end
|
13
|
+
new( recs )
|
14
|
+
end
|
15
|
+
|
16
|
+
|
8
17
|
def initialize( recs=nil )
|
9
18
|
@countries = []
|
10
19
|
@by_code = {} ## countries by codes (fifa, internet, etc)
|
@@ -45,9 +54,6 @@ class CountryIndex
|
|
45
54
|
|
46
55
|
|
47
56
|
def _add( recs )
|
48
|
-
###########################################
|
49
|
-
## auto-fill countries
|
50
|
-
## pp recs
|
51
57
|
recs.each do |rec|
|
52
58
|
key = rec.code.downcase ## add codes lookups - key, fifa, ...
|
53
59
|
if @by_code[ key ]
|
data/lib/fifa/version.rb
CHANGED
data/lib/fifa.rb
CHANGED
@@ -15,15 +15,19 @@ require_relative 'fifa/org_index'
|
|
15
15
|
|
16
16
|
module Fifa
|
17
17
|
def self.world
|
18
|
-
@world ||=
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
@world ||= CountryIndex.read(
|
19
|
+
"#{Fifa.data_dir}/africa/countries.txt",
|
20
|
+
"#{Fifa.data_dir}/asia/countries.txt",
|
21
|
+
"#{Fifa.data_dir}/caribbean/countries.txt",
|
22
|
+
"#{Fifa.data_dir}/central-america/countries.txt",
|
23
|
+
"#{Fifa.data_dir}/europe/countries.txt",
|
24
|
+
"#{Fifa.data_dir}/middle-east/countries.txt",
|
25
|
+
"#{Fifa.data_dir}/north-america/countries.txt",
|
26
|
+
"#{Fifa.data_dir}/pacific/countries.txt",
|
27
|
+
"#{Fifa.data_dir}/south-america/countries.txt",
|
28
|
+
"#{Fifa.data_dir}/countries_history.txt" )
|
24
29
|
end
|
25
30
|
|
26
|
-
|
27
31
|
## note: only returns fifa member countries (use world.countries for all) !!!
|
28
32
|
def self.countries() world.members( :fifa ); end
|
29
33
|
|
@@ -34,9 +38,9 @@ end # class Fifa
|
|
34
38
|
|
35
39
|
|
36
40
|
|
37
|
-
## add Uefa convenience
|
41
|
+
## add Uefa/Conmebol convenience modules - why? why not?
|
38
42
|
module Uefa
|
39
|
-
def self.countries() Fifa.
|
43
|
+
def self.countries() Fifa.members(:uefa); end
|
40
44
|
end
|
41
45
|
|
42
46
|
module Conmebol
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fifa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2024.9.
|
4
|
+
version: 2024.9.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sportdb-structs
|
@@ -65,24 +65,44 @@ executables: []
|
|
65
65
|
extensions: []
|
66
66
|
extra_rdoc_files:
|
67
67
|
- CHANGELOG.md
|
68
|
+
- LICENSE.md
|
68
69
|
- Manifest.txt
|
69
70
|
- NOTES.md
|
70
71
|
- README.md
|
71
|
-
- config/countries.txt
|
72
|
+
- config/africa/countries.txt
|
73
|
+
- config/asia/countries.txt
|
74
|
+
- config/caribbean/countries.txt
|
75
|
+
- config/central-america/countries.txt
|
76
|
+
- config/countries_history.txt
|
77
|
+
- config/europe/countries.txt
|
78
|
+
- config/middle-east/countries.txt
|
79
|
+
- config/north-america/countries.txt
|
80
|
+
- config/pacific/countries.txt
|
81
|
+
- config/south-america/countries.txt
|
72
82
|
files:
|
73
83
|
- CHANGELOG.md
|
84
|
+
- LICENSE.md
|
74
85
|
- Manifest.txt
|
75
86
|
- NOTES.md
|
76
87
|
- README.md
|
77
88
|
- Rakefile
|
78
|
-
- config/countries.txt
|
89
|
+
- config/africa/countries.txt
|
90
|
+
- config/asia/countries.txt
|
91
|
+
- config/caribbean/countries.txt
|
92
|
+
- config/central-america/countries.txt
|
93
|
+
- config/countries_history.txt
|
94
|
+
- config/europe/countries.txt
|
95
|
+
- config/middle-east/countries.txt
|
96
|
+
- config/north-america/countries.txt
|
97
|
+
- config/pacific/countries.txt
|
98
|
+
- config/south-america/countries.txt
|
79
99
|
- lib/fifa.rb
|
80
100
|
- lib/fifa/country_index.rb
|
81
101
|
- lib/fifa/country_reader.rb
|
82
102
|
- lib/fifa/org_index.rb
|
83
103
|
- lib/fifa/outline_reader.rb
|
84
104
|
- lib/fifa/version.rb
|
85
|
-
homepage: https://github.com/sportdb/
|
105
|
+
homepage: https://github.com/sportdb/fifa
|
86
106
|
licenses:
|
87
107
|
- Public Domain
|
88
108
|
metadata: {}
|