footty 2026.5.26 → 2026.7.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7726fe860831f64a9657a1753ec0769e071551d9633b853948b5eb8f1ae494b5
4
- data.tar.gz: ef6f9655ec6615d0a429379e5fb498162dfbf59f941f7d07f534ab78deed8b2f
3
+ metadata.gz: 65f5533452cf48683abfde5075e538390787e6b40c2aafe494071fe27fc9c842
4
+ data.tar.gz: f587747909b804ee3928e2a6655476572394b562fbea4f14675e77d9d7194956
5
5
  SHA512:
6
- metadata.gz: b260dca09d8a9ae981a35a373cf5d2701ae3e4ef74df454ce20f96354043f1e2018e61e6aee05acedd23edfc52650aa1287eaa9d2950689a5bc653398ba032e9
7
- data.tar.gz: e407f6ac2b10758c1ea14a81098df914b30f76df3bba15cd2a90719ec8444843538f4a47c74b46ccd15c35817110187709a635d0bbf68e9d72acffaf68ff40a6
6
+ metadata.gz: cb323f3353b8d207237c2a7fcb06a22d000337566cfc0365e85f999cebabdf788dd9167c7d738178d6aa241cf147770d6afcc161ade61664b465027610cd0332
7
+ data.tar.gz: '05386dfe5561cb7dda8d3367ec02c5ca575cb73f0a6a38788d123b24b8c8f23f0c3e75f565a9c3574554e5bf41d20c4fa9508c9877534aeac1cb3499d3d69a33'
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 2026.5.26
1
+ ### 2026.7.7
2
2
  ### 1.0.0 / 2018-06-09
3
3
 
4
4
  * Everything is new (again). First release.
data/README.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
 
10
10
 
11
+ ## Step 0 - Installation Via Gems
12
+
13
+ To install the command-line tool via gems (ruby's package manager) use:
14
+
15
+ $ gem install footty
16
+
11
17
 
12
18
 
13
19
  ## Usage - Who's playing today?
@@ -17,7 +23,6 @@ for upcoming or past matches. For example:
17
23
 
18
24
  $ footty # Defaults to today's matches of top leagues
19
25
 
20
-
21
26
  prints on Sep 27, 2024:
22
27
 
23
28
  ==> English Premier League 2024/25
@@ -91,19 +96,11 @@ See [footty/openfootball](https://github.com/sportdb/footty/blob/master/footty/l
91
96
  Why tty? tty stands for teletype (tty) writer and is the old traditional (short) name for the unix command line.
92
97
 
93
98
 
94
- ## Install
95
-
96
- Just install the gem:
97
-
98
- $ gem install footty
99
-
100
99
 
101
100
  ## License
102
101
 
103
102
  The `footty` scripts are dedicated to the public domain.
104
- Use it as you please with no restrictions whatsoever.
105
-
106
-
103
+ Use as you please with no restrictions whatsoever.
107
104
 
108
105
 
109
106
  ## Questions? Comments?
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require './lib/footty/version.rb'
4
4
  Hoe.spec 'footty' do
5
5
  self.version = Footty::VERSION
6
6
 
7
- self.summary = "footty - football.db command line tool for national & int'l football club leagues (& cups) from around the world (bonus - incl. world cup, euro and more)"
7
+ self.summary = "footty - football.db command line tool(s) for national & int'l football club leagues (& cups) from around the world (bonus - incl. world cup, euro and more)"
8
8
  self.description = summary
9
9
 
10
10
  self.urls = { home: 'https://github.com/sportdb/footty' }
@@ -17,8 +17,11 @@ Hoe.spec 'footty' do
17
17
  self.history_file = 'CHANGELOG.md'
18
18
 
19
19
  self.extra_deps = [
20
- ['sportdb-quick', '>= 0.7.0'],
21
20
  ['webget'],
21
+ ['fbtxt-parser', '>= 0.9.0'],
22
+ ['fbtxt-document', '>= 0.9.0'],
23
+ ['fbtok', '>= 0.9.0'],
24
+ ['fbtxt2json', '>= 0.9.0']
22
25
  ]
23
26
 
24
27
  self.licenses = ['Public Domain']
data/bin/footty CHANGED
@@ -3,6 +3,13 @@
3
3
  ## tip: to test run:
4
4
  ## ruby -I ./lib bin/footty
5
5
 
6
+
7
+ ## quick hack
8
+ ## if available always use latest (local) source version
9
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db.v2/parser/lib' )
10
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db.v2/document/lib' )
11
+
12
+
6
13
  require 'footty'
7
14
 
8
15
  Footty.main
data/bin/ftty CHANGED
@@ -3,6 +3,12 @@
3
3
  ## tip: to test run:
4
4
  ## ruby -I ./lib bin/ftty
5
5
 
6
+ ## quick hack
7
+ ## if available always use latest (local) source version
8
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db.v2/parser/lib' )
9
+ $LOAD_PATH.unshift( '/sports/sportdb/sport.db.v2/document/lib' )
10
+
11
+
6
12
  require 'footty'
7
13
 
8
14
  Footty.main
@@ -110,11 +110,19 @@ module Footty
110
110
  matches = []
111
111
  urls.each do |url|
112
112
  txt = get!( url ) ## use "memoized" / cached result
113
- parser = SportDb::QuickMatchReader.new( txt )
114
- matches += parser.parse
113
+ doc = Fbtxt::Document.new( txt )
114
+ matches += doc.matches
115
115
  ### for multiple source file use latest name as "definitive"
116
- @league_name = parser.league_name
117
- ### todo/fix - report errors
116
+ @league_name = doc.title || '??'
117
+
118
+ ### todo/fix - imrove report errors formula
119
+ if doc.errors?
120
+ puts "!! HTTP ERROR - #{response.status.code} #{response.status.message}"
121
+ exit 1
122
+ puts "!! PARSE - #{doc.errors.size} parse error(s) in >#{url}<:"
123
+ pp doc.errors
124
+ exit 1
125
+ end
118
126
  end
119
127
 
120
128
  matches = matches.map {|match| match.as_json } # convert to json
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Footty
3
- VERSION = '2026.5.26'
3
+ VERSION = '2026.7.7'
4
4
 
5
5
  def self.banner
6
6
  "footty/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
data/lib/footty.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'sportdb/quick' ## note - pulls in cocos et al
1
+ require 'fbtxt/document' ## note - pulls in cocos et al
2
2
  require 'webget' ## add webcache support
3
3
 
4
4
 
@@ -24,10 +24,3 @@ Webcache.root = './cache'
24
24
 
25
25
  # pp Webcache.root
26
26
  Webget.config.sleep = 1 ## set delay in secs (to 1 sec - default is/maybe 3)
27
-
28
-
29
-
30
-
31
-
32
-
33
- Footty.main if __FILE__ == $0
metadata CHANGED
@@ -1,43 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: footty
3
3
  version: !ruby/object:Gem::Version
4
- version: 2026.5.26
4
+ version: 2026.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-26 00:00:00.000000000 Z
11
+ date: 2026-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: sportdb-quick
14
+ name: webget
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: webget
28
+ name: fbtxt-parser
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.9.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.9.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: fbtxt-document
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: fbtok
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 0.9.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: fbtxt2json
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 0.9.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.9.0
41
83
  - !ruby/object:Gem::Dependency
42
84
  name: rdoc
43
85
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +114,7 @@ dependencies:
72
114
  - - "~>"
73
115
  - !ruby/object:Gem::Version
74
116
  version: '4.2'
75
- description: footty - football.db command line tool for national & int'l football
117
+ description: footty - football.db command line tool(s) for national & int'l football
76
118
  club leagues (& cups) from around the world (bonus - incl. world cup, euro and more)
77
119
  email: gerald.bauer@gmail.com
78
120
  executables:
@@ -121,6 +163,6 @@ requirements: []
121
163
  rubygems_version: 3.5.22
122
164
  signing_key:
123
165
  specification_version: 4
124
- summary: footty - football.db command line tool for national & int'l football club
166
+ summary: footty - football.db command line tool(s) for national & int'l football club
125
167
  leagues (& cups) from around the world (bonus - incl. world cup, euro and more)
126
168
  test_files: []