gooby 0.9.5 → 1.0.0
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/README +19 -6
- data/lib/gooby.rb +21 -24
- data/samples/20050305_corporate_cup_hm.html +255 -255
- data/samples/20050430_nashville_marathon.html +1212 -1212
- data/samples/20060115_phoenix_marathon.html +1284 -1284
- data/samples/20070310_corporate_cup_hm.html +1172 -1172
- data/samples/phoenix_marathon.html +1282 -1282
- data/tests/ts_gooby.rb +3 -3
- data/tests/ts_gooby_min.rb +2 -2
- metadata +2 -2
data/README
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
= Gooby = Google APIs + Ruby
|
2
2
|
|
3
|
-
Version: 0.
|
3
|
+
Version: 1.0.0 - 2007/03/21
|
4
|
+
|
5
|
+
Gooby = Google APIs + Ruby. Release 1.0.0 generates Google maps from GPS data
|
6
|
+
exported by your Garmin Forerunner GPS unit, or manually edited CSV file.
|
7
|
+
Please see the README file. Feedback is requested. Sample maps at:
|
8
|
+
http://www.joakimsoftware.com/gmap/20050430_nashville_marathon.html
|
9
|
+
http://www.joakimsoftware.com/gmap/20060115_phoenix_marathon.html
|
10
|
+
http://www.joakimsoftware.com/gmap/20050305_corporate_cup_hm.html
|
11
|
+
http://www.joakimsoftware.com/gmap/20070310_corporate_cup_hm.html
|
12
|
+
http://www.joakimsoftware.com/gmap/phoenix_marathon.html
|
13
|
+
|
14
|
+
In April 2007, see the 'quick-ETL' project, which will enable you to load
|
15
|
+
your GPS data to a relational database.
|
4
16
|
|
5
17
|
---
|
6
18
|
|
@@ -20,7 +32,7 @@ Google maps are applicable really to any outdoor activity for which GPS data
|
|
20
32
|
can be obtained. The focus of Gooby is on running, because the author is a
|
21
33
|
marathon runner, and the Garmin Forerunner (I use both models 201 and 205)
|
22
34
|
is primarily intended for running. Therefore the names of the classes and
|
23
|
-
methods are running oriented (ex. - Run, Track, Trackpoint,
|
35
|
+
methods are running oriented (ex. - Run, Track, Trackpoint, Pace, Distance,
|
24
36
|
etc).
|
25
37
|
|
26
38
|
Other activities, such as cycling, hiking, walking, driving, and even golfing
|
@@ -29,7 +41,8 @@ swimming Google Maps can also be created with Gooby. Please let me know how
|
|
29
41
|
you use Gooby! Feedback is requested.
|
30
42
|
|
31
43
|
All Gooby functionality is intended to be invoked from a command line.
|
32
|
-
Web and Rails integration may be done in a later release.
|
44
|
+
Web and Rails integration may be done in a later release. See the example
|
45
|
+
usage section below.
|
33
46
|
|
34
47
|
See the Goals/Requirements and Usage sections below for the complete list of
|
35
48
|
Gooby functionality.
|
@@ -57,9 +70,9 @@ Gooby is packaged and installed as a ruby 'gem'. Download the latest gem to
|
|
57
70
|
your computer, then run the following command from your download directory.
|
58
71
|
The -t flag will cause the Gooby regression test suite to be executed.
|
59
72
|
|
60
|
-
gem install gooby-0.
|
73
|
+
gem install gooby-1.0.0.gem
|
61
74
|
or
|
62
|
-
gem install gooby-0.
|
75
|
+
gem install gooby-1.0.0.gem -t
|
63
76
|
|
64
77
|
== Running the Gooby Test Suite
|
65
78
|
|
@@ -211,7 +224,7 @@ f7. Provide the ability to alter appropriate Gooby behavior via a simple
|
|
211
224
|
b. Allow the user to specify a distance unit-of-measure in either
|
212
225
|
miles, kilometers, or yards.
|
213
226
|
|
214
|
-
status =
|
227
|
+
status = complete
|
215
228
|
|
216
229
|
f8. Provide adequate user documentation and scripts, so that someone other
|
217
230
|
than the author can actually use Gooby.
|
data/lib/gooby.rb
CHANGED
@@ -22,17 +22,17 @@ line type Module or Class name
|
|
22
22
|
948 class TrainingCenterXmlSplitter
|
23
23
|
1053 class GeoData
|
24
24
|
1236 class GoogleMapGenerator
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
1605 class History
|
26
|
+
1636 class Lap
|
27
|
+
1651 class Line
|
28
|
+
1721 class Options
|
29
|
+
1796 class Position
|
30
|
+
1840 class Run
|
31
|
+
2029 class SimpleXmlParser
|
32
|
+
2069 class Track
|
33
|
+
2116 class Trackpoint
|
34
|
+
2305 class CodeScanner
|
35
|
+
2597 class GoobyCommand
|
36
36
|
|
37
37
|
Gooby - Copyright 2007 by Chris Joakim.
|
38
38
|
Gooby is available under GNU General Public License (GPL) license.
|
@@ -64,12 +64,12 @@ module Gooby
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def project_version_number
|
67
|
-
'0.
|
67
|
+
'1.0.0'
|
68
68
|
end
|
69
69
|
|
70
|
-
# Return a String date, like '2007/03/
|
70
|
+
# Return a String date, like '2007/03/21'.
|
71
71
|
def project_date
|
72
|
-
'2007/03/
|
72
|
+
'2007/03/21'
|
73
73
|
end
|
74
74
|
|
75
75
|
# Return a String containing the project author name.
|
@@ -1259,6 +1259,7 @@ module Gooby
|
|
1259
1259
|
@lat_idx = @options.get('csv_lat_idx') if @options.get('csv_lat_idx')
|
1260
1260
|
@lng_idx = @options.get('csv_lng_idx') if @options.get('csv_lng_idx')
|
1261
1261
|
@alt_idx = @options.get('csv_alt_idx') if @options.get('csv_alt_idx')
|
1262
|
+
@title = @options.get("#{@csv_file}")
|
1262
1263
|
|
1263
1264
|
@content_hash = Hash.new('')
|
1264
1265
|
@run = Gooby::Run.new(1)
|
@@ -1289,7 +1290,7 @@ Returns a Hash with specific generated content at the following keys:
|
|
1289
1290
|
@options = options
|
1290
1291
|
end
|
1291
1292
|
@content_hash['when_generated'] = Time.now
|
1292
|
-
@content_hash['title'] = @
|
1293
|
+
@content_hash['title'] = @title
|
1293
1294
|
@icon_url_base = @options.get('gmap_icon_url_base')
|
1294
1295
|
filter_trackpoints
|
1295
1296
|
compute_center_point
|
@@ -1349,7 +1350,7 @@ s = <<HERE
|
|
1349
1350
|
</head>
|
1350
1351
|
<body onload="load()" onunload="GUnload()">
|
1351
1352
|
<center>
|
1352
|
-
<h3> #{
|
1353
|
+
<h3> #{@title} </h3>
|
1353
1354
|
<h5> Generated by Gooby #{content_hash['when_generated']} <br> Gooby = Google APIs + Ruby </h5>
|
1354
1355
|
#{content_hash['map_div']}
|
1355
1356
|
#{content_hash['messages_div']}
|
@@ -1357,12 +1358,7 @@ s = <<HERE
|
|
1357
1358
|
</body>
|
1358
1359
|
</html>
|
1359
1360
|
HERE
|
1360
|
-
|
1361
|
-
# html_file = File.new(out_file, "w+")
|
1362
|
-
# html_file.write(s)
|
1363
|
-
# html_file.flush
|
1364
|
-
# html_file.close
|
1365
|
-
puts s # Output is redirected by shell.
|
1361
|
+
puts s # Redirect output via shell.
|
1366
1362
|
end
|
1367
1363
|
|
1368
1364
|
private
|
@@ -1419,8 +1415,9 @@ HERE
|
|
1419
1415
|
size = @options.get('gmap_size_control')
|
1420
1416
|
type = @options.get('gmap_type')
|
1421
1417
|
zoom = @options.get('gmap_zoom_level')
|
1422
|
-
title = @options.get(
|
1423
|
-
|
1418
|
+
title = @options.get("#{@csv_file}")
|
1419
|
+
title = '' if title == nil
|
1420
|
+
zoom_tab = @options.get('gmap_zoom_tab')
|
1424
1421
|
if size
|
1425
1422
|
if size == 'smallmap'
|
1426
1423
|
size = 'GSmallMapControl'
|