sportdb-models 1.14.1 → 1.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +6 -0
- data/lib/sportdb/csv_reader.rb +241 -0
- data/lib/sportdb/models.rb +2 -0
- data/lib/sportdb/version.rb +1 -1
- data/test/data/csv/de-2013-14--1-bundesliga.txt +307 -0
- data/test/data/de-deutschland/2013-14/1-bundesliga.yml +26 -0
- data/test/data/de-deutschland/leagues.txt +4 -0
- data/test/data/de-deutschland/teams.txt +53 -0
- data/test/test_csv_reader.rb +45 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 179911cd446977787834641fb8b19728b05d0e4a
|
4
|
+
data.tar.gz: 61469a6cb2ffa0b24f3567c7e263d62fded9250f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ffd8c25d110694f82f32205fc79b108375f85f705815be5288cddc058ac964f0a4a24c0541f53226e008bb3c4f818cf59dec62a55550fdeefd1e648b50623bf
|
7
|
+
data.tar.gz: 680a475c8be1cffc47740e7c0b72354073d99bc44930d1ee1f58bcdec3d4f5fcfbe11c9219df757495d5f102602b0738b63ae8b6204ee9438bec82d7ae1789d5
|
data/Manifest.txt
CHANGED
@@ -12,6 +12,7 @@ config/fixtures/ro.yml
|
|
12
12
|
data/seasons.txt
|
13
13
|
data/setups/all.txt
|
14
14
|
lib/sportdb/calc.rb
|
15
|
+
lib/sportdb/csv_reader.rb
|
15
16
|
lib/sportdb/deleter.rb
|
16
17
|
lib/sportdb/finders/date.rb
|
17
18
|
lib/sportdb/finders/goals.rb
|
@@ -90,6 +91,10 @@ test/data/at-austria/2015_16/cup.yml
|
|
90
91
|
test/data/at-austria/leagues.txt
|
91
92
|
test/data/at-austria/teams.txt
|
92
93
|
test/data/at-austria/teams_2.txt
|
94
|
+
test/data/csv/de-2013-14--1-bundesliga.txt
|
95
|
+
test/data/de-deutschland/2013-14/1-bundesliga.yml
|
96
|
+
test/data/de-deutschland/leagues.txt
|
97
|
+
test/data/de-deutschland/teams.txt
|
93
98
|
test/data/national-teams/assocs.txt
|
94
99
|
test/data/national-teams/europe/assocs.txt
|
95
100
|
test/data/national-teams/europe/teams.txt
|
@@ -131,6 +136,7 @@ test/data/world-cup/teams_1974.txt
|
|
131
136
|
test/helper.rb
|
132
137
|
test/test_assoc_reader.rb
|
133
138
|
test/test_changes.rb
|
139
|
+
test/test_csv_reader.rb
|
134
140
|
test/test_cursor.rb
|
135
141
|
test/test_date.rb
|
136
142
|
test/test_event_reader.rb
|
@@ -0,0 +1,241 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
|
4
|
+
module SportDb
|
5
|
+
|
6
|
+
|
7
|
+
class CsvGameReader
|
8
|
+
|
9
|
+
include LogUtils::Logging
|
10
|
+
|
11
|
+
## make models available by default with namespace
|
12
|
+
# e.g. lets you use Usage instead of Model::Usage
|
13
|
+
include Models
|
14
|
+
|
15
|
+
##
|
16
|
+
## todo: add from_file and from_zip too
|
17
|
+
|
18
|
+
def self.from_string( event_key, text )
|
19
|
+
### fix - fix -fix:
|
20
|
+
## change event to event_or_event_key !!!!! - allow event_key as string passed in
|
21
|
+
self.new( event_key, text )
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize( event_key, text )
|
25
|
+
### fix - fix -fix:
|
26
|
+
## change event to event_or_event_key !!!!! - allow event_key as string passed in
|
27
|
+
|
28
|
+
## todo/fix: how to add opts={} ???
|
29
|
+
@event_key = event_key
|
30
|
+
@text = text
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
def read
|
35
|
+
## note: assume active activerecord connection
|
36
|
+
@event = Event.find_by!( key: @event_key )
|
37
|
+
|
38
|
+
logger.debug "Event #{@event.key} >#{@event.title}<"
|
39
|
+
|
40
|
+
@team_mapper = TextUtils::TitleMapper.new( @event.teams, 'team' )
|
41
|
+
|
42
|
+
## reset cached values
|
43
|
+
@patch_round_ids = []
|
44
|
+
|
45
|
+
@last_round = nil ## remove last round ?? - always required - why? why not?
|
46
|
+
@last_date = nil ## remove last date ?? - always required - why? why not?
|
47
|
+
|
48
|
+
parse_fixtures
|
49
|
+
end # method load_fixtures
|
50
|
+
|
51
|
+
|
52
|
+
def handle_round( round_pos_str )
|
53
|
+
|
54
|
+
round_pos = round_pos_str.to_i
|
55
|
+
|
56
|
+
round_attribs = { }
|
57
|
+
|
58
|
+
round = Round.find_by( event_id: @event.id,
|
59
|
+
pos: round_pos )
|
60
|
+
|
61
|
+
if round.present?
|
62
|
+
logger.debug "update round #{round.id}:"
|
63
|
+
else
|
64
|
+
logger.debug "create round:"
|
65
|
+
round = Round.new
|
66
|
+
|
67
|
+
round_attribs = round_attribs.merge( {
|
68
|
+
event_id: @event.id,
|
69
|
+
pos: round_pos,
|
70
|
+
title: "Round #{round_pos}",
|
71
|
+
title2: nil,
|
72
|
+
knockout: false,
|
73
|
+
start_at: Date.parse('1911-11-11'),
|
74
|
+
end_at: Date.parse('1911-11-11')
|
75
|
+
})
|
76
|
+
end
|
77
|
+
|
78
|
+
logger.debug round_attribs.to_json
|
79
|
+
|
80
|
+
round.update_attributes!( round_attribs )
|
81
|
+
|
82
|
+
### store list of round ids for patching start_at/end_at at the end
|
83
|
+
@patch_round_ids << round.id
|
84
|
+
@last_round = round ## keep track of last seen round for matches that follow etc.
|
85
|
+
end
|
86
|
+
|
87
|
+
def handle_game( date_str, team1_str, team2_str, ft_str, ht_str )
|
88
|
+
|
89
|
+
## todo/fix: make more "efficient"
|
90
|
+
## - e.g. add new support method for mapping single team/reference - why? why not??
|
91
|
+
line = "#{team1_str} - #{team2_str}"
|
92
|
+
@team_mapper.map_titles!( line )
|
93
|
+
team1_key = @team_mapper.find_key!( line )
|
94
|
+
team2_key = @team_mapper.find_key!( line )
|
95
|
+
|
96
|
+
## note: if we do NOT find two teams; return false - no match found
|
97
|
+
if team1_key.nil? || team2_key.nil?
|
98
|
+
fail " no game match (two teams required) found for line: >#{line}<"
|
99
|
+
end
|
100
|
+
|
101
|
+
if date_str
|
102
|
+
date = DateTime.strptime( date_str, '%Y-%m-%d' ) ## (always) use DateTime - why? why not??
|
103
|
+
@last_date = date # keep a reference for later use
|
104
|
+
else
|
105
|
+
date = @last_date # no date found; (re)use last seen date
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
## todo: support for awarded, abadoned, a.e.t, pen. etc. - why?? why not??
|
110
|
+
##
|
111
|
+
|
112
|
+
if ht_str ## half time scores
|
113
|
+
scoresi_str = ht_str.gsub(/ /, '').split('-') ## note: remove all (inline) spaces first
|
114
|
+
score1i = scoresi_str[0].to_i
|
115
|
+
score2i = scoresi_str[1].to_i
|
116
|
+
else
|
117
|
+
score1i = nil
|
118
|
+
score2i = nil
|
119
|
+
end
|
120
|
+
|
121
|
+
if ft_str ## full time scores
|
122
|
+
scores_str = ft_str.gsub(/ /, '').split('-') ## note: remove all (inline) spaces first
|
123
|
+
score1 = scores_str[0].to_i
|
124
|
+
score2 = scores_str[1].to_i
|
125
|
+
else
|
126
|
+
score1 = nil
|
127
|
+
score2 = nil
|
128
|
+
end
|
129
|
+
|
130
|
+
### todo: cache team lookups in hash? - why? why not??
|
131
|
+
team1 = Team.find_by!( key: team1_key )
|
132
|
+
team2 = Team.find_by!( key: team2_key )
|
133
|
+
|
134
|
+
round = @last_round
|
135
|
+
|
136
|
+
### check if games exists
|
137
|
+
## with this teams in this round if yes only update
|
138
|
+
game = Game.find_by( round_id: round.id,
|
139
|
+
team1_id: team1.id,
|
140
|
+
team2_id: team2.id )
|
141
|
+
|
142
|
+
game_attribs = {
|
143
|
+
score1: score1,
|
144
|
+
score2: score2,
|
145
|
+
score1i: score1i,
|
146
|
+
score2i: score2i,
|
147
|
+
play_at: date,
|
148
|
+
play_at_v2: nil,
|
149
|
+
postponed: false,
|
150
|
+
knockout: false, ## round.knockout, ## note: for now always use knockout flag from round - why? why not??
|
151
|
+
ground_id: nil,
|
152
|
+
group_id: nil
|
153
|
+
}
|
154
|
+
|
155
|
+
if game.present?
|
156
|
+
logger.debug "update game #{game.id}:"
|
157
|
+
else
|
158
|
+
logger.debug "create game:"
|
159
|
+
game = Game.new
|
160
|
+
|
161
|
+
## Note: use round.games.count for pos
|
162
|
+
## lets us add games out of order if later needed
|
163
|
+
more_game_attribs = {
|
164
|
+
round_id: round.id,
|
165
|
+
team1_id: team1.id,
|
166
|
+
team2_id: team2.id,
|
167
|
+
pos: round.games.count+1
|
168
|
+
}
|
169
|
+
game_attribs = game_attribs.merge( more_game_attribs )
|
170
|
+
end
|
171
|
+
|
172
|
+
logger.debug game_attribs.to_json
|
173
|
+
game.update_attributes!( game_attribs )
|
174
|
+
|
175
|
+
end # method handle_game
|
176
|
+
|
177
|
+
|
178
|
+
def parse_fixtures
|
179
|
+
|
180
|
+
CSV.parse( @text, headers: true ) do |row|
|
181
|
+
puts row.inspect
|
182
|
+
|
183
|
+
pp round = row['Round']
|
184
|
+
pp date = row['Date']
|
185
|
+
pp team1 = row['Team 1']
|
186
|
+
pp team2 = row['Team 2']
|
187
|
+
pp ft = row['FT']
|
188
|
+
pp ht = row['HT']
|
189
|
+
|
190
|
+
## find round by pos
|
191
|
+
if round
|
192
|
+
handle_round( round )
|
193
|
+
handle_game( date, team1, team2, ft, ht )
|
194
|
+
else
|
195
|
+
fail "round required for import; sorry"
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
###########################
|
200
|
+
# backtrack and patch round dates (start_at/end_at)
|
201
|
+
|
202
|
+
unless @patch_round_ids.empty?
|
203
|
+
###
|
204
|
+
# note: use uniq - to allow multiple round headers (possible?)
|
205
|
+
|
206
|
+
Round.find( @patch_round_ids.uniq ).each do |r|
|
207
|
+
logger.debug "patch round start_at/end_at date for #{r.title}:"
|
208
|
+
|
209
|
+
## note:
|
210
|
+
## will add "scope" pos first e.g
|
211
|
+
#
|
212
|
+
## SELECT "games".* FROM "games" WHERE "games"."round_id" = ?
|
213
|
+
# ORDER BY pos, play_at asc [["round_id", 7]]
|
214
|
+
# thus will NOT order by play_at but by pos first!!!
|
215
|
+
# =>
|
216
|
+
# need to unscope pos!!! or use unordered_games - games_by_play_at_date etc.??
|
217
|
+
# thus use reorder()!!! - not just order('play_at asc')
|
218
|
+
|
219
|
+
games = r.games.reorder( 'play_at asc' ).all
|
220
|
+
|
221
|
+
## skip rounds w/ no games
|
222
|
+
|
223
|
+
## todo/check/fix: what's the best way for checking assoc w/ 0 recs?
|
224
|
+
next if games.size == 0
|
225
|
+
|
226
|
+
# note: make sure start_at/end_at is date only (e.g. use play_at.to_date)
|
227
|
+
# sqlite3 saves datetime in date field as datetime, for example (will break date compares later!)
|
228
|
+
|
229
|
+
round_attribs = {
|
230
|
+
start_at: games[0].play_at.to_date, # use games.first ?
|
231
|
+
end_at: games[-1].play_at.to_date # use games.last ? why? why not?
|
232
|
+
}
|
233
|
+
|
234
|
+
logger.debug round_attribs.to_json
|
235
|
+
r.update_attributes!( round_attribs )
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end # method parse_fixtures
|
239
|
+
|
240
|
+
end # class CsvGameReader
|
241
|
+
end # module SportDb
|
data/lib/sportdb/models.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
# core and stlibs (note: get included via worlddb-models gem; see worlddb-models gem/lib)
|
5
|
+
require 'csv' # used by CsvGameReader
|
5
6
|
|
6
7
|
|
7
8
|
require 'worlddb/models' # NOTE: include worlddb-models gem (not cli tools gem, that is, worlddb)
|
@@ -92,6 +93,7 @@ require 'sportdb/pretty_printer'
|
|
92
93
|
|
93
94
|
## "simplified" match reader for rsssf-formated/style leagues
|
94
95
|
require 'sportdb/rsssf_reader'
|
96
|
+
require 'sportdb/csv_reader'
|
95
97
|
|
96
98
|
|
97
99
|
module SportDb
|
data/lib/sportdb/version.rb
CHANGED
@@ -0,0 +1,307 @@
|
|
1
|
+
Round,Date,Team 1,Team 2,FT,HT
|
2
|
+
1,2013-08-09,Bayern München,Bor. Mönchengladbach,3-1,2-1
|
3
|
+
1,2013-08-10,Bayer Leverkusen,SC Freiburg,3-1,1-1
|
4
|
+
1,2013-08-10,Hannover 96,VfL Wolfsburg,2-0,1-0
|
5
|
+
1,2013-08-10,1899 Hoffenheim,1. FC Nürnberg,2-2,1-0
|
6
|
+
1,2013-08-10,FC Augsburg,Borussia Dortmund,0-4,0-1
|
7
|
+
1,2013-08-10,Hertha BSC,Eintracht Frankfurt,6-1,2-1
|
8
|
+
1,2013-08-10,Eintracht Braunschweig,Werder Bremen,0-1,0-0
|
9
|
+
1,2013-08-11,1. FSV Mainz 05,VfB Stuttgart,3-2,1-1
|
10
|
+
1,2013-08-11,FC Schalke 04,Hamburger SV,3-3,2-2
|
11
|
+
2,2013-08-17,VfB Stuttgart,Bayer Leverkusen,0-1,0-1
|
12
|
+
2,2013-08-17,VfL Wolfsburg,FC Schalke 04,4-0,0-0
|
13
|
+
2,2013-08-17,Werder Bremen,FC Augsburg,1-0,1-0
|
14
|
+
2,2013-08-17,SC Freiburg,1. FSV Mainz 05,1-2,0-0
|
15
|
+
2,2013-08-17,Hamburger SV,1899 Hoffenheim,1-5,1-1
|
16
|
+
2,2013-08-17,Eintracht Frankfurt,Bayern München,0-1,0-1
|
17
|
+
2,2013-08-17,Bor. Mönchengladbach,Hannover 96,3-0,1-0
|
18
|
+
2,2013-08-18,1. FC Nürnberg,Hertha BSC,2-2,1-0
|
19
|
+
2,2013-08-18,Borussia Dortmund,Eintracht Braunschweig,2-1,0-0
|
20
|
+
3,2013-08-23,Borussia Dortmund,Werder Bremen,1-0,0-0
|
21
|
+
3,2013-08-24,Bayern München,1. FC Nürnberg,2-0,0-0
|
22
|
+
3,2013-08-24,Bayer Leverkusen,Bor. Mönchengladbach,4-2,2-0
|
23
|
+
3,2013-08-24,Hannover 96,FC Schalke 04,2-1,2-0
|
24
|
+
3,2013-08-24,1899 Hoffenheim,SC Freiburg,3-3,2-2
|
25
|
+
3,2013-08-24,1. FSV Mainz 05,VfL Wolfsburg,2-0,0-0
|
26
|
+
3,2013-08-24,Hertha BSC,Hamburger SV,1-0,0-0
|
27
|
+
3,2013-08-25,Eintracht Braunschweig,Eintracht Frankfurt,0-2,0-0
|
28
|
+
3,2013-08-25,FC Augsburg,VfB Stuttgart,2-1,2-1
|
29
|
+
4,2013-08-27,SC Freiburg,Bayern München,1-1,0-1
|
30
|
+
4,2013-08-31,Bor. Mönchengladbach,Werder Bremen,4-1,1-0
|
31
|
+
4,2013-08-31,Hannover 96,1. FSV Mainz 05,4-1,2-1
|
32
|
+
4,2013-08-31,VfL Wolfsburg,Hertha BSC,2-0,2-0
|
33
|
+
4,2013-08-31,1. FC Nürnberg,FC Augsburg,0-1,0-0
|
34
|
+
4,2013-08-31,Hamburger SV,Eintracht Braunschweig,4-0,2-0
|
35
|
+
4,2013-08-31,FC Schalke 04,Bayer Leverkusen,2-0,1-0
|
36
|
+
4,2013-09-01,VfB Stuttgart,1899 Hoffenheim,6-2,3-1
|
37
|
+
4,2013-09-01,Eintracht Frankfurt,Borussia Dortmund,1-2,1-1
|
38
|
+
5,2013-09-13,Hertha BSC,VfB Stuttgart,0-1,0-0
|
39
|
+
5,2013-09-14,Bayern München,Hannover 96,2-0,0-0
|
40
|
+
5,2013-09-14,Bayer Leverkusen,VfL Wolfsburg,3-1,1-1
|
41
|
+
5,2013-09-14,Werder Bremen,Eintracht Frankfurt,0-3,0-2
|
42
|
+
5,2013-09-14,1. FSV Mainz 05,FC Schalke 04,0-1,0-1
|
43
|
+
5,2013-09-14,FC Augsburg,SC Freiburg,2-1,0-0
|
44
|
+
5,2013-09-14,Borussia Dortmund,Hamburger SV,6-2,2-1
|
45
|
+
5,2013-09-15,1899 Hoffenheim,Bor. Mönchengladbach,2-1,1-0
|
46
|
+
5,2013-09-15,Eintracht Braunschweig,1. FC Nürnberg,1-1,0-1
|
47
|
+
6,2013-09-20,Bor. Mönchengladbach,Eintracht Braunschweig,4-1,2-0
|
48
|
+
6,2013-09-21,Hannover 96,FC Augsburg,2-1,0-0
|
49
|
+
6,2013-09-21,VfL Wolfsburg,1899 Hoffenheim,2-1,1-1
|
50
|
+
6,2013-09-21,1. FC Nürnberg,Borussia Dortmund,1-1,0-1
|
51
|
+
6,2013-09-21,1. FSV Mainz 05,Bayer Leverkusen,1-4,0-3
|
52
|
+
6,2013-09-21,Hamburger SV,Werder Bremen,0-2,0-1
|
53
|
+
6,2013-09-21,FC Schalke 04,Bayern München,0-4,0-2
|
54
|
+
6,2013-09-22,SC Freiburg,Hertha BSC,1-1,1-1
|
55
|
+
6,2013-09-22,VfB Stuttgart,Eintracht Frankfurt,1-1,1-1
|
56
|
+
7,2013-09-27,FC Augsburg,Bor. Mönchengladbach,2-2,1-1
|
57
|
+
7,2013-09-28,Borussia Dortmund,SC Freiburg,5-0,2-0
|
58
|
+
7,2013-09-28,Bayern München,VfL Wolfsburg,1-0,0-0
|
59
|
+
7,2013-09-28,Bayer Leverkusen,Hannover 96,2-0,2-0
|
60
|
+
7,2013-09-28,1899 Hoffenheim,FC Schalke 04,3-3,1-3
|
61
|
+
7,2013-09-28,Hertha BSC,1. FSV Mainz 05,3-1,0-1
|
62
|
+
7,2013-09-28,Eintracht Frankfurt,Hamburger SV,2-2,1-1
|
63
|
+
7,2013-09-29,Werder Bremen,1. FC Nürnberg,3-3,2-1
|
64
|
+
7,2013-09-29,Eintracht Braunschweig,VfB Stuttgart,0-4,0-1
|
65
|
+
8,2013-10-04,Hannover 96,Hertha BSC,1-1,1-0
|
66
|
+
8,2013-10-05,FC Schalke 04,FC Augsburg,4-1,2-1
|
67
|
+
8,2013-10-05,Bor. Mönchengladbach,Borussia Dortmund,2-0,0-0
|
68
|
+
8,2013-10-05,VfB Stuttgart,Werder Bremen,1-1,1-1
|
69
|
+
8,2013-10-05,VfL Wolfsburg,Eintracht Braunschweig,0-2,0-1
|
70
|
+
8,2013-10-05,1. FSV Mainz 05,1899 Hoffenheim,2-2,0-2
|
71
|
+
8,2013-10-05,Bayer Leverkusen,Bayern München,1-1,1-1
|
72
|
+
8,2013-10-06,1. FC Nürnberg,Hamburger SV,0-5,0-1
|
73
|
+
8,2013-10-06,SC Freiburg,Eintracht Frankfurt,1-1,0-0
|
74
|
+
9,2013-10-18,1899 Hoffenheim,Bayer Leverkusen,1-2,0-1
|
75
|
+
9,2013-10-19,Borussia Dortmund,Hannover 96,1-0,1-0
|
76
|
+
9,2013-10-19,Bayern München,1. FSV Mainz 05,4-1,0-1
|
77
|
+
9,2013-10-19,Werder Bremen,SC Freiburg,0-0,0-0
|
78
|
+
9,2013-10-19,Eintracht Braunschweig,FC Schalke 04,2-3,1-1
|
79
|
+
9,2013-10-19,Eintracht Frankfurt,1. FC Nürnberg,1-1,0-0
|
80
|
+
9,2013-10-19,Hertha BSC,Bor. Mönchengladbach,1-0,1-0
|
81
|
+
9,2013-10-20,Hamburger SV,VfB Stuttgart,3-3,1-2
|
82
|
+
9,2013-10-20,FC Augsburg,VfL Wolfsburg,1-2,1-2
|
83
|
+
10,2013-10-25,VfB Stuttgart,1. FC Nürnberg,1-1,1-1
|
84
|
+
10,2013-10-26,Bayern München,Hertha BSC,3-2,1-1
|
85
|
+
10,2013-10-26,FC Schalke 04,Borussia Dortmund,1-3,0-1
|
86
|
+
10,2013-10-26,Bayer Leverkusen,FC Augsburg,2-1,1-1
|
87
|
+
10,2013-10-26,Hannover 96,1899 Hoffenheim,1-4,0-2
|
88
|
+
10,2013-10-26,1. FSV Mainz 05,Eintracht Braunschweig,2-0,1-0
|
89
|
+
10,2013-10-26,VfL Wolfsburg,Werder Bremen,3-0,1-0
|
90
|
+
10,2013-10-27,SC Freiburg,Hamburger SV,0-3,0-1
|
91
|
+
10,2013-10-27,Bor. Mönchengladbach,Eintracht Frankfurt,4-1,2-1
|
92
|
+
11,2013-11-01,Borussia Dortmund,VfB Stuttgart,6-1,2-1
|
93
|
+
11,2013-11-02,1. FC Nürnberg,SC Freiburg,0-3,0-0
|
94
|
+
11,2013-11-02,1899 Hoffenheim,Bayern München,1-2,1-1
|
95
|
+
11,2013-11-02,Hamburger SV,Bor. Mönchengladbach,0-2,0-1
|
96
|
+
11,2013-11-02,Eintracht Braunschweig,Bayer Leverkusen,1-0,0-0
|
97
|
+
11,2013-11-02,Hertha BSC,FC Schalke 04,0-2,0-1
|
98
|
+
11,2013-11-02,Eintracht Frankfurt,VfL Wolfsburg,1-2,1-1
|
99
|
+
11,2013-11-03,FC Augsburg,1. FSV Mainz 05,2-1,1-0
|
100
|
+
11,2013-11-03,Werder Bremen,Hannover 96,3-2,2-2
|
101
|
+
12,2013-11-08,Hannover 96,Eintracht Braunschweig,0-0,0-0
|
102
|
+
12,2013-11-09,Bayern München,FC Augsburg,3-0,2-0
|
103
|
+
12,2013-11-09,FC Schalke 04,Werder Bremen,3-1,0-1
|
104
|
+
12,2013-11-09,Bayer Leverkusen,Hamburger SV,5-3,2-1
|
105
|
+
12,2013-11-09,VfL Wolfsburg,Borussia Dortmund,2-1,0-1
|
106
|
+
12,2013-11-09,1899 Hoffenheim,Hertha BSC,2-3,0-1
|
107
|
+
12,2013-11-09,Bor. Mönchengladbach,1. FC Nürnberg,3-1,0-1
|
108
|
+
12,2013-11-10,1. FSV Mainz 05,Eintracht Frankfurt,1-0,0-0
|
109
|
+
12,2013-11-10,SC Freiburg,VfB Stuttgart,1-3,0-2
|
110
|
+
13,2013-11-22,VfB Stuttgart,Bor. Mönchengladbach,0-2,0-1
|
111
|
+
13,2013-11-23,1. FC Nürnberg,VfL Wolfsburg,1-1,0-1
|
112
|
+
13,2013-11-23,FC Augsburg,1899 Hoffenheim,2-0,2-0
|
113
|
+
13,2013-11-23,Eintracht Braunschweig,SC Freiburg,0-1,0-0
|
114
|
+
13,2013-11-23,Eintracht Frankfurt,FC Schalke 04,3-3,0-2
|
115
|
+
13,2013-11-23,Hertha BSC,Bayer Leverkusen,0-1,0-1
|
116
|
+
13,2013-11-23,Borussia Dortmund,Bayern München,0-3,0-0
|
117
|
+
13,2013-11-24,Hamburger SV,Hannover 96,3-1,1-1
|
118
|
+
13,2013-11-24,Werder Bremen,1. FSV Mainz 05,2-3,0-2
|
119
|
+
14,2013-11-29,VfL Wolfsburg,Hamburger SV,1-1,1-1
|
120
|
+
14,2013-11-30,Bayern München,Eintracht Braunschweig,2-0,2-0
|
121
|
+
14,2013-11-30,Bayer Leverkusen,1. FC Nürnberg,3-0,1-0
|
122
|
+
14,2013-11-30,1899 Hoffenheim,Werder Bremen,4-4,2-2
|
123
|
+
14,2013-11-30,1. FSV Mainz 05,Borussia Dortmund,1-3,0-0
|
124
|
+
14,2013-11-30,Hertha BSC,FC Augsburg,0-0,0-0
|
125
|
+
14,2013-11-30,FC Schalke 04,VfB Stuttgart,3-0,1-0
|
126
|
+
14,2013-12-01,Hannover 96,Eintracht Frankfurt,2-0,1-0
|
127
|
+
14,2013-12-01,Bor. Mönchengladbach,SC Freiburg,1-0,0-0
|
128
|
+
15,2013-12-06,1. FC Nürnberg,1. FSV Mainz 05,1-1,1-0
|
129
|
+
15,2013-12-07,Bor. Mönchengladbach,FC Schalke 04,2-1,2-1
|
130
|
+
15,2013-12-07,VfB Stuttgart,Hannover 96,4-2,2-2
|
131
|
+
15,2013-12-07,Werder Bremen,Bayern München,0-7,0-3
|
132
|
+
15,2013-12-07,Hamburger SV,FC Augsburg,0-1,0-1
|
133
|
+
15,2013-12-07,Eintracht Frankfurt,1899 Hoffenheim,1-2,0-0
|
134
|
+
15,2013-12-07,Borussia Dortmund,Bayer Leverkusen,0-1,0-1
|
135
|
+
15,2013-12-08,SC Freiburg,VfL Wolfsburg,0-3,0-2
|
136
|
+
15,2013-12-08,Eintracht Braunschweig,Hertha BSC,0-2,0-1
|
137
|
+
16,2013-12-13,Hertha BSC,Werder Bremen,3-2,2-2
|
138
|
+
16,2013-12-14,Bayern München,Hamburger SV,3-1,1-0
|
139
|
+
16,2013-12-14,Hannover 96,1. FC Nürnberg,3-3,0-3
|
140
|
+
16,2013-12-14,1899 Hoffenheim,Borussia Dortmund,2-2,2-1
|
141
|
+
16,2013-12-14,1. FSV Mainz 05,Bor. Mönchengladbach,0-0,0-0
|
142
|
+
16,2013-12-14,FC Augsburg,Eintracht Braunschweig,4-1,3-0
|
143
|
+
16,2013-12-14,VfL Wolfsburg,VfB Stuttgart,3-1,1-0
|
144
|
+
16,2013-12-15,FC Schalke 04,SC Freiburg,2-0,1-0
|
145
|
+
16,2013-12-15,Bayer Leverkusen,Eintracht Frankfurt,0-1,0-0
|
146
|
+
17,2013-12-20,Eintracht Frankfurt,FC Augsburg,1-1,1-1
|
147
|
+
17,2013-12-21,Borussia Dortmund,Hertha BSC,1-2,1-2
|
148
|
+
17,2013-12-21,Werder Bremen,Bayer Leverkusen,1-0,0-0
|
149
|
+
17,2013-12-21,SC Freiburg,Hannover 96,2-1,2-0
|
150
|
+
17,2013-12-21,Hamburger SV,1. FSV Mainz 05,2-3,1-0
|
151
|
+
17,2013-12-21,Eintracht Braunschweig,1899 Hoffenheim,1-0,1-0
|
152
|
+
17,2013-12-21,1. FC Nürnberg,FC Schalke 04,0-0,0-0
|
153
|
+
17,2013-12-22,Bor. Mönchengladbach,VfL Wolfsburg,2-2,0-0
|
154
|
+
17,2014-01-29,VfB Stuttgart,Bayern München,1-2,1-0
|
155
|
+
18,2014-01-24,Bor. Mönchengladbach,Bayern München,0-2,0-1
|
156
|
+
18,2014-01-25,SC Freiburg,Bayer Leverkusen,3-2,1-2
|
157
|
+
18,2014-01-25,VfL Wolfsburg,Hannover 96,1-3,1-1
|
158
|
+
18,2014-01-25,1. FC Nürnberg,1899 Hoffenheim,4-0,2-0
|
159
|
+
18,2014-01-25,VfB Stuttgart,1. FSV Mainz 05,1-2,1-1
|
160
|
+
18,2014-01-25,Borussia Dortmund,FC Augsburg,2-2,1-0
|
161
|
+
18,2014-01-25,Eintracht Frankfurt,Hertha BSC,1-0,1-0
|
162
|
+
18,2014-01-26,Werder Bremen,Eintracht Braunschweig,0-0,0-0
|
163
|
+
18,2014-01-26,Hamburger SV,FC Schalke 04,0-3,0-1
|
164
|
+
19,2014-01-31,Eintracht Braunschweig,Borussia Dortmund,1-2,0-1
|
165
|
+
19,2014-02-01,Bayer Leverkusen,VfB Stuttgart,2-1,1-1
|
166
|
+
19,2014-02-01,FC Schalke 04,VfL Wolfsburg,2-1,1-0
|
167
|
+
19,2014-02-01,FC Augsburg,Werder Bremen,3-1,1-1
|
168
|
+
19,2014-02-01,1. FSV Mainz 05,SC Freiburg,2-0,1-0
|
169
|
+
19,2014-02-01,1899 Hoffenheim,Hamburger SV,3-0,2-0
|
170
|
+
19,2014-02-01,Hannover 96,Bor. Mönchengladbach,3-1,0-0
|
171
|
+
19,2014-02-02,Hertha BSC,1. FC Nürnberg,1-3,1-1
|
172
|
+
19,2014-02-02,Bayern München,Eintracht Frankfurt,5-0,2-0
|
173
|
+
20,2014-02-07,Bor. Mönchengladbach,Bayer Leverkusen,0-1,0-0
|
174
|
+
20,2014-02-08,Werder Bremen,Borussia Dortmund,1-5,0-2
|
175
|
+
20,2014-02-08,1. FC Nürnberg,Bayern München,0-2,0-1
|
176
|
+
20,2014-02-08,SC Freiburg,1899 Hoffenheim,1-1,0-0
|
177
|
+
20,2014-02-08,VfL Wolfsburg,1. FSV Mainz 05,3-0,0-0
|
178
|
+
20,2014-02-08,Eintracht Frankfurt,Eintracht Braunschweig,3-0,3-0
|
179
|
+
20,2014-02-08,Hamburger SV,Hertha BSC,0-3,0-3
|
180
|
+
20,2014-02-09,VfB Stuttgart,FC Augsburg,1-4,0-2
|
181
|
+
20,2014-02-09,FC Schalke 04,Hannover 96,2-0,2-0
|
182
|
+
21,2014-02-14,1. FSV Mainz 05,Hannover 96,2-0,0-0
|
183
|
+
21,2014-02-15,Werder Bremen,Bor. Mönchengladbach,1-1,0-1
|
184
|
+
21,2014-02-15,1899 Hoffenheim,VfB Stuttgart,4-1,1-0
|
185
|
+
21,2014-02-15,Bayern München,SC Freiburg,4-0,3-0
|
186
|
+
21,2014-02-15,Eintracht Braunschweig,Hamburger SV,4-2,0-1
|
187
|
+
21,2014-02-15,Borussia Dortmund,Eintracht Frankfurt,4-0,2-0
|
188
|
+
21,2014-02-15,Bayer Leverkusen,FC Schalke 04,1-2,0-1
|
189
|
+
21,2014-02-16,FC Augsburg,1. FC Nürnberg,0-1,0-0
|
190
|
+
21,2014-02-16,Hertha BSC,VfL Wolfsburg,1-2,1-0
|
191
|
+
22,2014-02-21,FC Schalke 04,1. FSV Mainz 05,0-0,0-0
|
192
|
+
22,2014-02-22,Hamburger SV,Borussia Dortmund,3-0,1-0
|
193
|
+
22,2014-02-22,Bor. Mönchengladbach,1899 Hoffenheim,2-2,2-0
|
194
|
+
22,2014-02-22,SC Freiburg,FC Augsburg,2-4,1-1
|
195
|
+
22,2014-02-22,1. FC Nürnberg,Eintracht Braunschweig,2-1,0-1
|
196
|
+
22,2014-02-22,VfB Stuttgart,Hertha BSC,1-2,1-1
|
197
|
+
22,2014-02-22,VfL Wolfsburg,Bayer Leverkusen,3-1,1-1
|
198
|
+
22,2014-02-23,Eintracht Frankfurt,Werder Bremen,0-0,0-0
|
199
|
+
22,2014-02-23,Hannover 96,Bayern München,0-4,0-2
|
200
|
+
23,2014-02-28,Hertha BSC,SC Freiburg,0-0,0-0
|
201
|
+
23,2014-03-01,Eintracht Braunschweig,Bor. Mönchengladbach,1-1,0-1
|
202
|
+
23,2014-03-01,FC Augsburg,Hannover 96,1-1,0-1
|
203
|
+
23,2014-03-01,Borussia Dortmund,1. FC Nürnberg,3-0,0-0
|
204
|
+
23,2014-03-01,Bayer Leverkusen,1. FSV Mainz 05,0-1,0-1
|
205
|
+
23,2014-03-01,Werder Bremen,Hamburger SV,1-0,1-0
|
206
|
+
23,2014-03-01,Bayern München,FC Schalke 04,5-1,4-0
|
207
|
+
23,2014-03-02,1899 Hoffenheim,VfL Wolfsburg,6-2,4-1
|
208
|
+
23,2014-03-02,Eintracht Frankfurt,VfB Stuttgart,2-1,0-1
|
209
|
+
24,2014-03-08,VfL Wolfsburg,Bayern München,1-6,1-1
|
210
|
+
24,2014-03-08,Hannover 96,Bayer Leverkusen,1-1,1-1
|
211
|
+
24,2014-03-08,FC Schalke 04,1899 Hoffenheim,4-0,2-0
|
212
|
+
24,2014-03-08,Bor. Mönchengladbach,FC Augsburg,1-2,1-1
|
213
|
+
24,2014-03-08,VfB Stuttgart,Eintracht Braunschweig,2-2,2-1
|
214
|
+
24,2014-03-08,Hamburger SV,Eintracht Frankfurt,1-1,0-1
|
215
|
+
24,2014-03-08,1. FC Nürnberg,Werder Bremen,0-2,0-1
|
216
|
+
24,2014-03-09,SC Freiburg,Borussia Dortmund,0-1,0-0
|
217
|
+
24,2014-03-09,1. FSV Mainz 05,Hertha BSC,1-1,0-0
|
218
|
+
25,2014-03-14,FC Augsburg,FC Schalke 04,1-2,1-1
|
219
|
+
25,2014-03-15,Borussia Dortmund,Bor. Mönchengladbach,1-2,0-2
|
220
|
+
25,2014-03-15,Werder Bremen,VfB Stuttgart,1-1,0-0
|
221
|
+
25,2014-03-15,Hertha BSC,Hannover 96,0-3,0-0
|
222
|
+
25,2014-03-15,Eintracht Braunschweig,VfL Wolfsburg,1-1,0-1
|
223
|
+
25,2014-03-15,1899 Hoffenheim,1. FSV Mainz 05,2-4,0-0
|
224
|
+
25,2014-03-15,Bayern München,Bayer Leverkusen,2-1,1-0
|
225
|
+
25,2014-03-16,Hamburger SV,1. FC Nürnberg,2-1,0-0
|
226
|
+
25,2014-03-16,Eintracht Frankfurt,SC Freiburg,1-4,0-1
|
227
|
+
26,2014-03-21,SC Freiburg,Werder Bremen,3-1,1-0
|
228
|
+
26,2014-03-22,Hannover 96,Borussia Dortmund,0-3,0-1
|
229
|
+
26,2014-03-22,1. FSV Mainz 05,Bayern München,0-2,0-0
|
230
|
+
26,2014-03-22,VfL Wolfsburg,FC Augsburg,1-1,0-1
|
231
|
+
26,2014-03-22,VfB Stuttgart,Hamburger SV,1-0,0-0
|
232
|
+
26,2014-03-22,FC Schalke 04,Eintracht Braunschweig,3-1,1-0
|
233
|
+
26,2014-03-22,Bor. Mönchengladbach,Hertha BSC,3-0,3-0
|
234
|
+
26,2014-03-23,1. FC Nürnberg,Eintracht Frankfurt,2-5,0-1
|
235
|
+
26,2014-03-23,Bayer Leverkusen,1899 Hoffenheim,2-3,1-2
|
236
|
+
27,2014-03-25,Hertha BSC,Bayern München,1-3,0-2
|
237
|
+
27,2014-03-25,Borussia Dortmund,FC Schalke 04,0-0,0-0
|
238
|
+
27,2014-03-25,Werder Bremen,VfL Wolfsburg,1-3,1-2
|
239
|
+
27,2014-03-25,Eintracht Braunschweig,1. FSV Mainz 05,3-1,2-1
|
240
|
+
27,2014-03-26,Eintracht Frankfurt,Bor. Mönchengladbach,1-0,1-0
|
241
|
+
27,2014-03-26,FC Augsburg,Bayer Leverkusen,1-3,0-1
|
242
|
+
27,2014-03-26,1. FC Nürnberg,VfB Stuttgart,2-0,1-0
|
243
|
+
27,2014-03-26,1899 Hoffenheim,Hannover 96,3-1,1-1
|
244
|
+
27,2014-03-26,Hamburger SV,SC Freiburg,1-1,0-0
|
245
|
+
28,2014-03-28,FC Schalke 04,Hertha BSC,2-0,1-0
|
246
|
+
28,2014-03-29,VfB Stuttgart,Borussia Dortmund,2-3,2-1
|
247
|
+
28,2014-03-29,Bayern München,1899 Hoffenheim,3-3,3-2
|
248
|
+
28,2014-03-29,1. FSV Mainz 05,FC Augsburg,3-0,2-0
|
249
|
+
28,2014-03-29,Bayer Leverkusen,Eintracht Braunschweig,1-1,0-0
|
250
|
+
28,2014-03-29,VfL Wolfsburg,Eintracht Frankfurt,2-1,0-1
|
251
|
+
28,2014-03-29,SC Freiburg,1. FC Nürnberg,3-2,1-2
|
252
|
+
28,2014-03-30,Bor. Mönchengladbach,Hamburger SV,3-1,1-1
|
253
|
+
28,2014-03-30,Hannover 96,Werder Bremen,1-2,1-0
|
254
|
+
29,2014-04-04,Hamburger SV,Bayer Leverkusen,2-1,1-0
|
255
|
+
29,2014-04-05,FC Augsburg,Bayern München,1-0,1-0
|
256
|
+
29,2014-04-05,Werder Bremen,FC Schalke 04,1-1,1-1
|
257
|
+
29,2014-04-05,1. FC Nürnberg,Bor. Mönchengladbach,0-2,0-1
|
258
|
+
29,2014-04-05,VfB Stuttgart,SC Freiburg,2-0,0-0
|
259
|
+
29,2014-04-05,Eintracht Frankfurt,1. FSV Mainz 05,2-0,0-0
|
260
|
+
29,2014-04-05,Borussia Dortmund,VfL Wolfsburg,2-1,0-1
|
261
|
+
29,2014-04-06,Eintracht Braunschweig,Hannover 96,3-0,2-0
|
262
|
+
29,2014-04-06,Hertha BSC,1899 Hoffenheim,1-1,1-1
|
263
|
+
30,2014-04-11,FC Schalke 04,Eintracht Frankfurt,2-0,0-0
|
264
|
+
30,2014-04-12,1. FSV Mainz 05,Werder Bremen,3-0,3-0
|
265
|
+
30,2014-04-12,VfL Wolfsburg,1. FC Nürnberg,4-1,2-1
|
266
|
+
30,2014-04-12,Hannover 96,Hamburger SV,2-1,1-0
|
267
|
+
30,2014-04-12,SC Freiburg,Eintracht Braunschweig,2-0,1-0
|
268
|
+
30,2014-04-12,Bor. Mönchengladbach,VfB Stuttgart,1-1,0-1
|
269
|
+
30,2014-04-12,Bayern München,Borussia Dortmund,0-3,0-1
|
270
|
+
30,2014-04-13,Bayer Leverkusen,Hertha BSC,2-1,2-1
|
271
|
+
30,2014-04-13,1899 Hoffenheim,FC Augsburg,2-0,2-0
|
272
|
+
31,2014-04-17,Eintracht Frankfurt,Hannover 96,2-3,1-3
|
273
|
+
31,2014-04-19,Eintracht Braunschweig,Bayern München,0-2,0-0
|
274
|
+
31,2014-04-19,SC Freiburg,Bor. Mönchengladbach,4-2,0-1
|
275
|
+
31,2014-04-19,Werder Bremen,1899 Hoffenheim,3-1,1-1
|
276
|
+
31,2014-04-19,Borussia Dortmund,1. FSV Mainz 05,4-2,2-1
|
277
|
+
31,2014-04-19,FC Augsburg,Hertha BSC,0-0,0-0
|
278
|
+
31,2014-04-19,Hamburger SV,VfL Wolfsburg,1-3,0-2
|
279
|
+
31,2014-04-20,1. FC Nürnberg,Bayer Leverkusen,1-4,1-1
|
280
|
+
31,2014-04-20,VfB Stuttgart,FC Schalke 04,3-1,1-0
|
281
|
+
32,2014-04-25,Hannover 96,VfB Stuttgart,0-0,0-0
|
282
|
+
32,2014-04-26,Bayern München,Werder Bremen,5-2,1-2
|
283
|
+
32,2014-04-26,1. FSV Mainz 05,1. FC Nürnberg,2-0,2-0
|
284
|
+
32,2014-04-26,VfL Wolfsburg,SC Freiburg,2-2,1-0
|
285
|
+
32,2014-04-26,Hertha BSC,Eintracht Braunschweig,2-0,0-0
|
286
|
+
32,2014-04-26,1899 Hoffenheim,Eintracht Frankfurt,0-0,0-0
|
287
|
+
32,2014-04-26,Bayer Leverkusen,Borussia Dortmund,2-2,2-2
|
288
|
+
32,2014-04-27,FC Augsburg,Hamburger SV,3-1,3-1
|
289
|
+
32,2014-04-27,FC Schalke 04,Bor. Mönchengladbach,0-1,0-1
|
290
|
+
33,2014-05-03,Hamburger SV,Bayern München,1-4,0-1
|
291
|
+
33,2014-05-03,SC Freiburg,FC Schalke 04,0-2,0-1
|
292
|
+
33,2014-05-03,Eintracht Frankfurt,Bayer Leverkusen,0-2,0-2
|
293
|
+
33,2014-05-03,1. FC Nürnberg,Hannover 96,0-2,0-1
|
294
|
+
33,2014-05-03,VfB Stuttgart,VfL Wolfsburg,1-2,0-1
|
295
|
+
33,2014-05-03,Borussia Dortmund,1899 Hoffenheim,3-2,3-1
|
296
|
+
33,2014-05-03,Bor. Mönchengladbach,1. FSV Mainz 05,3-1,1-0
|
297
|
+
33,2014-05-03,Eintracht Braunschweig,FC Augsburg,0-1,0-0
|
298
|
+
33,2014-05-03,Werder Bremen,Hertha BSC,2-0,0-0
|
299
|
+
34,2014-05-10,Hertha BSC,Borussia Dortmund,0-4,0-2
|
300
|
+
34,2014-05-10,VfL Wolfsburg,Bor. Mönchengladbach,3-1,1-0
|
301
|
+
34,2014-05-10,Bayern München,VfB Stuttgart,1-0,0-0
|
302
|
+
34,2014-05-10,Bayer Leverkusen,Werder Bremen,2-1,1-1
|
303
|
+
34,2014-05-10,FC Schalke 04,1. FC Nürnberg,4-1,2-0
|
304
|
+
34,2014-05-10,Hannover 96,SC Freiburg,3-2,1-0
|
305
|
+
34,2014-05-10,1. FSV Mainz 05,Hamburger SV,3-2,1-1
|
306
|
+
34,2014-05-10,1899 Hoffenheim,Eintracht Braunschweig,3-1,1-0
|
307
|
+
34,2014-05-10,FC Augsburg,Eintracht Frankfurt,2-1,1-1
|
@@ -0,0 +1,26 @@
|
|
1
|
+
################################
|
2
|
+
# Deutsche Bundesliga 2013/14
|
3
|
+
|
4
|
+
league: de
|
5
|
+
season: 2013/14
|
6
|
+
start_at: 2013-08-09
|
7
|
+
|
8
|
+
18 teams:
|
9
|
+
- Bayern München
|
10
|
+
- Bor. Mönchengladbach
|
11
|
+
- Bayer Leverkusen
|
12
|
+
- SC Freiburg
|
13
|
+
- Hannover 96
|
14
|
+
- VfL Wolfsburg
|
15
|
+
- 1899 Hoffenheim
|
16
|
+
- 1. FC Nürnberg
|
17
|
+
- FC Augsburg
|
18
|
+
- Borussia Dortmund
|
19
|
+
- Hertha BSC
|
20
|
+
- Eintracht Frankfurt
|
21
|
+
- Eintracht Braunschweig
|
22
|
+
- Werder Bremen
|
23
|
+
- 1. FSV Mainz 05
|
24
|
+
- VfB Stuttgart
|
25
|
+
- FC Schalke 04
|
26
|
+
- Hamburger SV
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
bayern, FC Bayern München|Bayern München, FCB
|
3
|
+
|
4
|
+
dortmund, Borussia Dortmund|Bor. Dortmund, BVB
|
5
|
+
dortmundii, Dortmund II|Bor. Dortmund II
|
6
|
+
|
7
|
+
leverkusen, Bayer 04 Leverkusen|Bayer Leverkusen|Bay. Leverkusen, B04
|
8
|
+
schalke, Schalke 04|FC Schalke 04, S04
|
9
|
+
frankfurt, Eintracht Frankfurt|E. Frankfurt, FFM
|
10
|
+
hsv, Hamburger SV, HSV
|
11
|
+
mgladbach, Borussia M'gladbach|Bor. M'gladbach|Bor. Mönchengladbach|Borussia Mönchengladbach, BMG
|
12
|
+
hannover, Hannover 96, H96
|
13
|
+
wolfsburg, VfL Wolfsburg|Wolfsburg, WOB
|
14
|
+
mainz, 1. FSV Mainz 05|FSV Mainz 05, M05
|
15
|
+
mainzii, 1. FSV Mainz 05 II
|
16
|
+
|
17
|
+
bremen, Werder Bremen, BRE
|
18
|
+
bremenii, Werder Bremen II
|
19
|
+
|
20
|
+
hoffenheim, 1899 Hoffenheim|TSG 1899 Hoffenheim, HOF
|
21
|
+
|
22
|
+
stuttgart, Stuttgart|VfB Stuttgart, VFB
|
23
|
+
stuttgartii, Stuttgart II|VfB Stuttgart II
|
24
|
+
|
25
|
+
|
26
|
+
augsburg, FC Augsburg, FCA
|
27
|
+
herthabsc, Hertha BSC|Hertha Berliner Sport-Club, BSC
|
28
|
+
koeln, 1. FC Köln|Köln, KOE
|
29
|
+
|
30
|
+
ingolstadt, FC Ingolstadt 04|Ingolstadt, FCI
|
31
|
+
darmstadt, Darmstadt|SV Darmstadt 98, D98
|
32
|
+
|
33
|
+
|
34
|
+
paderborn, SC Paderborn 07|Paderborn, SCP
|
35
|
+
freiburg, SC Freiburg, SCF
|
36
|
+
braunschweig, Eintr. Braunschweig|Braunschweig|Eintracht Braunschweig, EBS
|
37
|
+
nuernberg, 1. FC Nürnberg, FCN
|
38
|
+
duesseldorf, Fortuna Düsseldorf|F. Düsseldorf, F95
|
39
|
+
fuerth, Greuther Fürth|SpVgg Greuther Fürth, SGF
|
40
|
+
klautern, 1. FC Kaiserslautern|1. FC K'lautern|K'lautern, FCK
|
41
|
+
fsvfrankfurt, FSV Frankfurt|FSV Frankfurt 1899, FSV
|
42
|
+
tsvmuenchen, 1860 München|TSV München 1860|TSV 1860 München, M60
|
43
|
+
unionberlin, Union Berlin|1. FC Union Berlin, FCU
|
44
|
+
|
45
|
+
bochum, VfL Bochum|Bochum|VfL Bochum 1848, BOC
|
46
|
+
stpauli, FC St. Pauli|St. Pauli, STP
|
47
|
+
sandhausen, SV Sandhausen|Sandhausen|SV Sandhausen 1916, SAN
|
48
|
+
karlsruhe, Karlsruhe|Karlsruher SC, KSC
|
49
|
+
heidenheim, Heidenheim|1. FC Heidenheim, HDH
|
50
|
+
leipzig, RB Leipzig, RBL
|
51
|
+
duisburg, MSV Duisburg|Duisburg, MSV
|
52
|
+
bielefeld, Bielefeld|Arminia Bielefeld|DSC Arminia Bielefeld, DSC
|
53
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
###
|
4
|
+
# to run use
|
5
|
+
# ruby -I ./lib -I ./test test/test_csv_reader.rb
|
6
|
+
|
7
|
+
|
8
|
+
require 'helper'
|
9
|
+
|
10
|
+
class TestCsvReader < MiniTest::Test
|
11
|
+
|
12
|
+
def setup
|
13
|
+
WorldDb.delete!
|
14
|
+
SportDb.delete!
|
15
|
+
SportDb.read_builtin
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_bl_2014
|
19
|
+
de = Country.create!( key: 'de', name: 'Deutschland', code: 'GER', pop: 1, area: 1 )
|
20
|
+
|
21
|
+
teamreader = TestTeamReader.from_file( 'de-deutschland/teams', country_id: de.id )
|
22
|
+
teamreader.read()
|
23
|
+
|
24
|
+
leaguereader = TestLeagueReader.from_file( 'de-deutschland/leagues', country_id: de.id )
|
25
|
+
leaguereader.read()
|
26
|
+
|
27
|
+
eventreader = TestEventReader.from_file( 'de-deutschland/2013-14/1-bundesliga' )
|
28
|
+
eventreader.read
|
29
|
+
|
30
|
+
assert true ## if we get here; assume everything ok
|
31
|
+
|
32
|
+
text = File.read_utf8( "#{SportDb.test_data_path}/csv/de-2013-14--1-bundesliga.txt" )
|
33
|
+
|
34
|
+
## bl = Event.find_by_key!( 'de.2013/14' )
|
35
|
+
|
36
|
+
r = SportDb::CsvGameReader.from_string( 'de.2013/14', text )
|
37
|
+
r.read
|
38
|
+
|
39
|
+
## assert_equal 10, bl.teams.count
|
40
|
+
## assert_equal 36, bl.rounds.count
|
41
|
+
## assert_equal 180, bl.games.count # 36x5 = 180
|
42
|
+
end
|
43
|
+
|
44
|
+
end # class TestCsvReader
|
45
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: worlddb-models
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- data/seasons.txt
|
91
91
|
- data/setups/all.txt
|
92
92
|
- lib/sportdb/calc.rb
|
93
|
+
- lib/sportdb/csv_reader.rb
|
93
94
|
- lib/sportdb/deleter.rb
|
94
95
|
- lib/sportdb/finders/date.rb
|
95
96
|
- lib/sportdb/finders/goals.rb
|
@@ -168,6 +169,10 @@ files:
|
|
168
169
|
- test/data/at-austria/leagues.txt
|
169
170
|
- test/data/at-austria/teams.txt
|
170
171
|
- test/data/at-austria/teams_2.txt
|
172
|
+
- test/data/csv/de-2013-14--1-bundesliga.txt
|
173
|
+
- test/data/de-deutschland/2013-14/1-bundesliga.yml
|
174
|
+
- test/data/de-deutschland/leagues.txt
|
175
|
+
- test/data/de-deutschland/teams.txt
|
171
176
|
- test/data/national-teams/assocs.txt
|
172
177
|
- test/data/national-teams/europe/assocs.txt
|
173
178
|
- test/data/national-teams/europe/teams.txt
|
@@ -209,6 +214,7 @@ files:
|
|
209
214
|
- test/helper.rb
|
210
215
|
- test/test_assoc_reader.rb
|
211
216
|
- test/test_changes.rb
|
217
|
+
- test/test_csv_reader.rb
|
212
218
|
- test/test_cursor.rb
|
213
219
|
- test/test_date.rb
|
214
220
|
- test/test_event_reader.rb
|