sportdb-writers 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0bf61e140b088804628afc2351b7b9a32975cd75
4
- data.tar.gz: cefaf1da69870273c3eeb7130e96c943ddf29d05
2
+ SHA256:
3
+ metadata.gz: dd53f29e4c9fc243e9a5c5ba34f0e603931317de512fd5e6c397525e49c5b773
4
+ data.tar.gz: 5d1a596224394e46ec4ad8b8466e925c1a916f5aeb4bc29fba1db55cd5bb7822
5
5
  SHA512:
6
- metadata.gz: 6102adb9c492d1cfe1d4d112bd4385524d78a9feaaed47cb058ca45f1db25d94d2c97e2806f75e4531a845cb6b1aba963e3f491b7465f13d2a2efc06bba8b63f
7
- data.tar.gz: de627bc67581498ccb674e23f9c68977cfd20363d8118788ab9554531cc77f158c3e949ede70c2f6f25e3f60a387710ea4572c70382d7c67c985cfdb40aefd1c
6
+ metadata.gz: c22afc771f1dc08681bb6a201c870b5e9688cf132a2b8d7d789fcefa1748569fdc6701e1f6b2d83f1da8c55c23bc6b7a0ba56903c2e881a65087a99f493181bb
7
+ data.tar.gz: ee81dcb5964247503b0d484889b12a122416fb3d0fd8f42cb712065d75501bf1cd18715e3d4b57b202a31a0ec9f6f5624a536b45552d3a64b29e9baffd65d9db
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- ### 0.0.1 / 2020-11-15
2
-
3
- * Everything is new. First release.
4
-
1
+ ### 0.1.0
2
+
3
+ ### 0.0.1 / 2020-11-15
4
+
5
+ * Everything is new. First release.
6
+
data/Manifest.txt CHANGED
@@ -12,10 +12,8 @@ lib/sportdb/leagues/leagues_mx.rb
12
12
  lib/sportdb/leagues/leagues_south_america.rb
13
13
  lib/sportdb/leagues/leagues_world.rb
14
14
  lib/sportdb/writers.rb
15
- lib/sportdb/writers/config.rb
15
+ lib/sportdb/writers/github.rb
16
+ lib/sportdb/writers/goals.rb
16
17
  lib/sportdb/writers/txt_writer.rb
17
18
  lib/sportdb/writers/version.rb
18
19
  lib/sportdb/writers/write.rb
19
- test/helper.rb
20
- test/test_txt_writer.rb
21
- test/test_version.rb
data/README.md CHANGED
@@ -1,28 +1,26 @@
1
- # sportdb-writers - sport.db writers for match schedules and results, and more
2
-
3
- * home :: [github.com/sportdb/sport.db](https://github.com/sportdb/sport.db)
4
- * bugs :: [github.com/sportdb/sport.db/issues](https://github.com/sportdb/sport.db/issues)
5
- * gem :: [rubygems.org/gems/sportdb-writers](https://rubygems.org/gems/sportdb-writers)
6
- * rdoc :: [rubydoc.info/gems/sportdb-writers](http://rubydoc.info/gems/sportdb-writers)
7
- * forum :: [groups.google.com/group/opensport](https://groups.google.com/group/opensport)
8
-
9
-
10
-
11
- ## Usage
12
-
13
- To be done
14
-
15
-
16
- ## License
17
-
18
- ![](https://publicdomainworks.github.io/buttons/zero88x31.png)
19
-
20
- The `sportdb-writers` scripts are dedicated to the public domain.
21
- Use it as you please with no restrictions whatsoever.
22
-
23
-
24
- ## Questions? Comments?
25
-
26
- Send them along to the
27
- [Open Sports & Friends Forum/Mailing List](http://groups.google.com/group/opensport).
28
- Thanks!
1
+ # sportdb-writers - sport.db writers for match schedules and results, and more
2
+
3
+ * home :: [github.com/sportdb/sport.db](https://github.com/sportdb/sport.db)
4
+ * bugs :: [github.com/sportdb/sport.db/issues](https://github.com/sportdb/sport.db/issues)
5
+ * gem :: [rubygems.org/gems/sportdb-writers](https://rubygems.org/gems/sportdb-writers)
6
+ * rdoc :: [rubydoc.info/gems/sportdb-writers](http://rubydoc.info/gems/sportdb-writers)
7
+ * forum :: [groups.google.com/group/opensport](https://groups.google.com/group/opensport)
8
+
9
+
10
+
11
+ ## Usage
12
+
13
+ To be done
14
+
15
+
16
+ ## License
17
+
18
+ The `sportdb-writers` scripts are dedicated to the public domain.
19
+ Use it as you please with no restrictions whatsoever.
20
+
21
+
22
+ ## Questions? Comments?
23
+
24
+ Yes, you can. More than welcome.
25
+ See [Help & Support »](https://github.com/openfootball/help)
26
+
data/Rakefile CHANGED
@@ -1,30 +1,32 @@
1
- require 'hoe'
2
- require './lib/sportdb/writers/version.rb'
3
-
4
- Hoe.spec 'sportdb-writers' do
5
-
6
- self.version = SportDb::Module::Writers::VERSION
7
-
8
- self.summary = 'sportdb-writers - sport.db writers for match schedules and results, and more'
9
- self.description = summary
10
-
11
- self.urls = { home: 'https://github.com/sportdb/sport.db' }
12
-
13
- self.author = 'Gerald Bauer'
14
- self.email = 'opensport@googlegroups.com'
15
-
16
- # switch extension to .markdown for gihub formatting
17
- self.readme_file = 'README.md'
18
- self.history_file = 'CHANGELOG.md'
19
-
20
- self.extra_deps = [
21
- ['sportdb-catalogs', '>= 1.0.0'],
22
- ]
23
-
24
- self.licenses = ['Public Domain']
25
-
26
- self.spec_extras = {
27
- required_ruby_version: '>= 2.2.2'
28
- }
29
-
30
- end
1
+ require 'hoe'
2
+ require './lib/sportdb/writers/version.rb'
3
+
4
+ Hoe.spec 'sportdb-writers' do
5
+
6
+ self.version = SportDb::Module::Writers::VERSION
7
+
8
+ self.summary = 'sportdb-writers - sport.db writers for match schedules and results, and more'
9
+ self.description = summary
10
+
11
+ self.urls = { home: 'https://github.com/sportdb/sport.db' }
12
+
13
+ self.author = 'Gerald Bauer'
14
+ self.email = 'gerald.bauer@gmail.com'
15
+
16
+ # switch extension to .markdown for gihub formatting
17
+ self.readme_file = 'README.md'
18
+ self.history_file = 'CHANGELOG.md'
19
+
20
+ self.extra_deps = [
21
+ ['sportdb-formats'], # , '>= 1.0.0'],
22
+ ['gitti'],
23
+ ['cocos'], ### fix - move upstream (incl. in sportdb-format)
24
+ ]
25
+
26
+ self.licenses = ['Public Domain']
27
+
28
+ self.spec_extras = {
29
+ required_ruby_version: '>= 2.2.2'
30
+ }
31
+
32
+ end
@@ -1,39 +1,35 @@
1
- module Writer
2
-
3
- ########################
4
- # Austria
5
-
6
- LEAGUES.merge!(
7
- 'at.1' => { name: 'Österr. Bundesliga',
8
- basename: '1-bundesliga',
9
- path: 'austria',
10
- lang: 'de_AT',
11
- stages: ->(season) {
12
- if season.start_year >= 2018
13
- [['Grunddurchgang'],
14
- ['Finaldurchgang - Meister',
15
- 'Finaldurchgang - Qualifikation',
16
- 'Europa League Play-off']]
17
- else
18
- nil
19
- end
20
- },
21
- },
22
- 'at.2' => { name: ->(season) { season.start_year >= 2018 ? 'Österr. 2. Liga' : 'Österr. Erste Liga' },
23
- basename: ->(season) { season.start_year >= 2018 ? '2-liga2' : '2-liga1' },
24
- path: 'austria',
25
- lang: 'de_AT',
26
- },
27
- 'at.3.o' => { name: 'Österr. Regionalliga Ost',
28
- basename: '3-regionalliga-ost',
29
- path: 'austria',
30
- lang: 'de_AT',
31
- },
32
- 'at.cup' => { name: 'ÖFB Cup',
33
- basename: 'cup',
34
- path: 'austria',
35
- lang: 'de_AT',
36
- }
37
- )
38
-
39
- end # module Writer
1
+ module Writer
2
+
3
+ ########################
4
+ # Austria
5
+
6
+ LEAGUES.merge!(
7
+ 'at.1' => { name: 'Österr. Bundesliga',
8
+ basename: '1-bundesliga',
9
+ stages: ->(season) {
10
+ if season.start_year >= 2018
11
+ [['Grunddurchgang'],
12
+ ['Finaldurchgang - Meister',
13
+ 'Finaldurchgang - Qualifikation',
14
+ 'Europa League Play-off']]
15
+ else
16
+ nil
17
+ end
18
+ },
19
+ },
20
+ 'at.2' => { name: ->(season) { season.start_year >= 2018 ?
21
+ 'Österr. 2. Liga' :
22
+ 'Österr. Erste Liga' },
23
+ basename: ->(season) { season.start_year >= 2018 ?
24
+ '2-liga2' :
25
+ '2-liga1' },
26
+ },
27
+ 'at.3.o' => { name: 'Österr. Regionalliga Ost',
28
+ basename: '3-regionalliga-ost',
29
+ },
30
+ 'at.cup' => { name: 'ÖFB Cup',
31
+ basename: 'cup',
32
+ }
33
+ )
34
+
35
+ end # module Writer
@@ -1,29 +1,21 @@
1
- module Writer
2
-
3
- ############################
4
- # Germany / Deutschland
5
-
6
- LEAGUES.merge!(
7
- 'de.1' => { name: 'Deutsche Bundesliga',
8
- basename: '1-bundesliga',
9
- path: 'deutschland',
10
- lang: 'de_DE',
11
- },
12
- 'de.2' => { name: 'Deutsche 2. Bundesliga',
13
- basename: '2-bundesliga2',
14
- path: 'deutschland',
15
- lang: 'de_DE',
16
- },
17
- 'de.3' => { name: 'Deutsche 3. Liga',
18
- basename: '3-liga3',
19
- path: 'deutschland',
20
- lang: 'de_DE',
21
- },
22
- 'de.cup' => { name: 'DFB Pokal',
23
- basename: 'cup',
24
- path: 'deutschland',
25
- lang: 'de_DE',
26
- }
27
- )
28
-
29
- end # module Writer
1
+ module Writer
2
+
3
+ ############################
4
+ # Germany / Deutschland
5
+
6
+ LEAGUES.merge!(
7
+ 'de.1' => { name: 'Deutsche Bundesliga',
8
+ basename: '1-bundesliga',
9
+ },
10
+ 'de.2' => { name: 'Deutsche 2. Bundesliga',
11
+ basename: '2-bundesliga2',
12
+ },
13
+ 'de.3' => { name: 'Deutsche 3. Liga',
14
+ basename: '3-liga3',
15
+ },
16
+ 'de.cup' => { name: 'DFB Pokal',
17
+ basename: 'cup',
18
+ }
19
+ )
20
+
21
+ end # module Writer
@@ -1,70 +1,58 @@
1
- module Writer
2
-
3
- ####################
4
- # England
5
-
6
-
7
- def self.eng1( season )
8
- case season ## todo/fix: - use cast e.g. Season(season) - make sure it's a season obj
9
- when Season('1888/89')..Season('1891/92') ## single league (no divisions)
10
- {name: 'English Football League',
11
- basename: '1-footballleague'}
12
- when Season('1892/93')..Season('1991/92') ## start of division 1 & 2
13
- {name: 'English Division One',
14
- basename: '1-division1'}
15
- else ## starts in season 1992/93
16
- {name: 'English Premier League',
17
- basename: '1-premierleague'}
18
- end
19
- end
20
-
21
- def self.eng2( season )
22
- case season
23
- when Season('1892/93')..Season('1991/92')
24
- {name: 'English Division Two', ## or use English Football League Second Division ???
25
- basename: '2-division2'}
26
- when Season('1992/93')..Season('2003/04') ## start of premier league
27
- {name: 'English Division One',
28
- basename: '2-division1'}
29
- else # starts in 2004/05
30
- {name: 'English Championship', ## rebranding divsion 1 => championship
31
- basename: '2-championship'}
32
- end
33
- end
34
-
35
-
36
- LEAGUES.merge!(
37
- 'eng.1' => { name: ->(season) { eng1( season )[ :name ] },
38
- basename: ->(season) { eng1( season )[ :basename ] },
39
- path: 'england',
40
- lang: 'en',
41
- },
42
- 'eng.2' => { name: ->(season) { eng2( season )[ :name ] },
43
- basename: ->(season) { eng2( season )[ :basename ] },
44
- path: 'england',
45
- lang: 'en',
46
- },
47
- 'eng.3' => { name: 'English League One',
48
- basename: '3-league1',
49
- path: 'england',
50
- lang: 'en',
51
- },
52
- 'eng.4' => { name: 'English League Two',
53
- basename: '4-league2',
54
- path: 'england',
55
- lang: 'en',
56
- },
57
- 'eng.5' => { name: 'English National League',
58
- basename: '5-nationalleague',
59
- path: 'england',
60
- lang: 'en',
61
- },
62
- 'eng.cup' => { name: 'English FA Cup',
63
- basename: 'facup',
64
- path: 'england',
65
- lang: 'en',
66
- }
67
- )
68
-
69
- end # module Writer
70
-
1
+ module Writer
2
+
3
+ ####################
4
+ # England
5
+
6
+
7
+ def self.eng1( season )
8
+ case season ## todo/fix: - use cast e.g. Season(season) - make sure it's a season obj
9
+ when Season('1888/89')..Season('1891/92') ## single league (no divisions)
10
+ {name: 'English Football League',
11
+ basename: '1-footballleague'}
12
+ when Season('1892/93')..Season('1991/92') ## start of division 1 & 2
13
+ {name: 'English Division One',
14
+ basename: '1-division1'}
15
+ else ## starts in season 1992/93
16
+ {name: 'English Premier League',
17
+ basename: '1-premierleague'}
18
+ end
19
+ end
20
+
21
+ def self.eng2( season )
22
+ case season
23
+ when Season('1892/93')..Season('1991/92')
24
+ {name: 'English Division Two', ## or use English Football League Second Division ???
25
+ basename: '2-division2'}
26
+ when Season('1992/93')..Season('2003/04') ## start of premier league
27
+ {name: 'English Division One',
28
+ basename: '2-division1'}
29
+ else # starts in 2004/05
30
+ {name: 'English Championship', ## rebranding divsion 1 => championship
31
+ basename: '2-championship'}
32
+ end
33
+ end
34
+
35
+
36
+ LEAGUES.merge!(
37
+ 'eng.1' => { name: ->(season) { eng1( season )[ :name ] },
38
+ basename: ->(season) { eng1( season )[ :basename ] },
39
+ },
40
+ 'eng.2' => { name: ->(season) { eng2( season )[ :name ] },
41
+ basename: ->(season) { eng2( season )[ :basename ] },
42
+ },
43
+ 'eng.3' => { name: 'English League One',
44
+ basename: '3-league1',
45
+ },
46
+ 'eng.4' => { name: 'English League Two',
47
+ basename: '4-league2',
48
+ },
49
+ 'eng.5' => { name: 'English National League',
50
+ basename: '5-nationalleague',
51
+ },
52
+ 'eng.cup' => { name: 'English FA Cup',
53
+ basename: 'facup',
54
+ }
55
+ )
56
+
57
+ end # module Writer
58
+
@@ -1,19 +1,15 @@
1
- module Writer
2
-
3
- LEAGUES.merge!(
4
- ###################
5
- # Spain / Espana
6
- 'es.1' => { name: 'Primera División de España',
7
- basename: '1-liga',
8
- path: 'espana',
9
- lang: 'es',
10
- },
11
- 'es.2' => { name: 'Segunda División de España',
12
- basename: '2-liga2',
13
- path: 'espana',
14
- lang: 'es',
15
- },
16
- )
17
-
18
- end # module Writer
19
-
1
+ module Writer
2
+
3
+ LEAGUES.merge!(
4
+ ###################
5
+ # Spain / Espana
6
+ 'es.1' => { name: 'Primera División de España',
7
+ basename: '1-liga',
8
+ },
9
+ 'es.2' => { name: 'Segunda División de España',
10
+ basename: '2-liga2',
11
+ },
12
+ )
13
+
14
+ end # module Writer
15
+