baseball_scorecard 0.0.3 → 0.0.4
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.
- data/atbat_example.png +0 -0
- data/lib/baseball_scorecard/card_generator.rb +2 -2
- data/lib/baseball_scorecard/version.rb +1 -1
- data/readme.txt +9 -2
- metadata +9 -8
data/atbat_example.png
ADDED
Binary file
|
@@ -8,7 +8,7 @@ end
|
|
8
8
|
module CardGenerator
|
9
9
|
|
10
10
|
def init_cards(game)
|
11
|
-
@image_dir = File.join(File.expand_path(File.dirname(__FILE__)), "images")
|
11
|
+
@image_dir = "file://#{File.join(File.expand_path(File.dirname(__FILE__)), "images")}"
|
12
12
|
Thread.new{init_batting_arrays(game)}
|
13
13
|
end
|
14
14
|
|
@@ -263,7 +263,7 @@ module CardGenerator
|
|
263
263
|
f.puts "</head>"
|
264
264
|
|
265
265
|
bg_img = File.join(@image_dir, 'grass.jpg')
|
266
|
-
f.puts "<body style=\"background-image: url('
|
266
|
+
f.puts "<body style=\"background-image: url('#{bg_img}')\">"
|
267
267
|
f.puts "<h1 style=\"text-align: center; color: white; font-family: Arial\">"
|
268
268
|
f.puts "<big>#{@visiting_team} #{@visiting_score} - #{@home_team} #{@home_score}</big>"
|
269
269
|
f.puts "</h1>"
|
data/readme.txt
CHANGED
@@ -8,6 +8,8 @@ Hey there -
|
|
8
8
|
|
9
9
|
INSTALL:
|
10
10
|
|
11
|
+
** note ** for version 0.0.3 I've removed the `hpricot` runtime dependency from the gemspec, as it was causing install problems with some Windows versions - if you don't already have the hpricot gem installed, make sure to install it first (gem install hpricot) and then...
|
12
|
+
|
11
13
|
gem install baseball_scorecard
|
12
14
|
|
13
15
|
RUN (in terminal):
|
@@ -33,20 +35,25 @@ scorecard
|
|
33
35
|
BB - Walk
|
34
36
|
IBB - Intentional Walk
|
35
37
|
HBP - Hit by Pitch
|
38
|
+
GR - Ground Rule
|
36
39
|
K - Strikeout Swinging
|
37
|
-
|
40
|
+
KC - Strikeout Looking (Called)
|
38
41
|
F - Fly Out
|
39
42
|
P - Pop Out
|
40
43
|
L - Line Out
|
41
44
|
G - Ground Out
|
42
|
-
|
45
|
+
FO - Force Out
|
46
|
+
FC - Fielder's Choice
|
43
47
|
DP - Double Play
|
44
48
|
TP - Triple Play
|
45
49
|
SB - Stolen Base
|
50
|
+
SAC - Sacrifice Play
|
46
51
|
E - Error
|
47
52
|
|
48
53
|
If a batter had more than one at bat in an inning, '+AB' is shown below the at bat result.
|
49
54
|
|
55
|
+
Take a look at the `atbat_example.png` file for more info.
|
56
|
+
|
50
57
|
Hovering over a particular at bat cell will show the description of the at bat. Hovering over a batter will show their season and career stats.
|
51
58
|
|
52
59
|
I've noticed that this works best for recent games, as not all of the data necessary to generate the scorecards is available for older games - for example, I tried creating cards for the 2004 ALCS game 7 for the screenshot (being a Red Sox fan,) and it didn't work :( - Had to go back a couple of weeks to find a game that we won instead!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: baseball_scorecard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: green_shoes
|
16
|
-
requirement: &
|
16
|
+
requirement: &74275680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *74275680
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: gameday_api
|
27
|
-
requirement: &
|
27
|
+
requirement: &74275470 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *74275470
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: launchy
|
38
|
-
requirement: &
|
38
|
+
requirement: &74275260 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *74275260
|
47
47
|
description: Baseball scorecard generator
|
48
48
|
email:
|
49
49
|
- jakekaiden@gmail.com
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- .gitignore
|
56
56
|
- Gemfile
|
57
57
|
- Rakefile
|
58
|
+
- atbat_example.png
|
58
59
|
- baseball_scorecard.gemspec
|
59
60
|
- bin/scorecard
|
60
61
|
- gameday_copyright.txt
|