footty 2026.5.26 → 2026.7.6

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: e610fb1316252ad640f6dc1797ff85af9252b00c7f3c90d4d182e683490f77b4
4
+ data.tar.gz: cacbd8b21aaa4f0e29225b158da9c0a35dc825ff6cfdbc4532662fa71997404c
5
5
  SHA512:
6
- metadata.gz: b260dca09d8a9ae981a35a373cf5d2701ae3e4ef74df454ce20f96354043f1e2018e61e6aee05acedd23edfc52650aa1287eaa9d2950689a5bc653398ba032e9
7
- data.tar.gz: e407f6ac2b10758c1ea14a81098df914b30f76df3bba15cd2a90719ec8444843538f4a47c74b46ccd15c35817110187709a635d0bbf68e9d72acffaf68ff40a6
6
+ metadata.gz: 8db64064a0d96b3c70a7a75fdb5246864c4e13ad950c39eb6a43795f6d6f9af45bf84f8a7590c46664c14547769c51b8116e030e64e1271df17be31e279f9a85
7
+ data.tar.gz: 94ab96e8e3dca3efa6a80fd30a72a469a41271b0819d9ff2a2ebafeb1b6491f10a043a4acc93c3f6f9a0bf99fb06309b9a03f127e26ba9b124b9ac2b07b44ef9
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 2026.5.26
1
+ ### 2026.7.6
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
+ ['sportdb-parser', '>= 0.8.0'],
22
+ ['sportdb-quick', '>= 0.8.0'],
23
+ ['fbtok'],
24
+ ['fbtxt2json']
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/quick/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/quick/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.6'
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
@@ -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,31 +1,73 @@
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.6
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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: webget
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sportdb-parser
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.8.0
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: sportdb-quick
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
45
  - - ">="
18
46
  - !ruby/object:Gem::Version
19
- version: 0.7.0
47
+ version: 0.8.0
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
52
  - - ">="
25
53
  - !ruby/object:Gem::Version
26
- version: 0.7.0
54
+ version: 0.8.0
27
55
  - !ruby/object:Gem::Dependency
28
- name: webget
56
+ name: fbtok
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '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'
69
+ - !ruby/object:Gem::Dependency
70
+ name: fbtxt2json
29
71
  requirement: !ruby/object:Gem::Requirement
30
72
  requirements:
31
73
  - - ">="
@@ -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: []