gooby 1.0.0 → 1.1.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 +144 -180
- data/bin/example_usage.txt +55 -0
- data/bin/gooby_been_there.rb +35 -0
- data/bin/gooby_config.rb +16 -0
- data/bin/gooby_gen_gmap.rb +16 -0
- data/bin/gooby_parser.rb +19 -0
- data/bin/gooby_splitter.rb +18 -0
- data/bin/gooby_version.rb +16 -0
- data/bin/run_all.sh +23 -0
- data/bin/run_been_there.sh +16 -0
- data/bin/run_db_gen.sh +11 -0
- data/bin/run_db_load.sh +11 -0
- data/bin/run_gen_gmaps.sh +20 -0
- data/bin/run_parse.sh +43 -0
- data/bin/run_parse_named.sh +19 -0
- data/bin/run_split.sh +23 -0
- data/config/gooby_config.yaml +137 -0
- data/data/20050305_corporate_cup_hm.csv +251 -251
- data/data/20050430_nashville_marathon.csv +1208 -1208
- data/data/20060115_phoenix_marathon.csv +1280 -1280
- data/data/davidson_11m_20070101.csv +251 -0
- data/data/davidson_11m_20070101.xml +2020 -0
- data/data/davidson_5K_20070505.csv +286 -0
- data/data/davidson_5K_20070505.xml +2875 -0
- data/lib/gooby.rb +889 -361
- data/samples/20050305_corporate_cup_hm.html +270 -270
- data/samples/20050430_nashville_marathon.html +1240 -1240
- data/samples/20060115_phoenix_marathon.html +1312 -1312
- data/samples/been_there.txt +744 -0
- data/samples/davidson_11m_20070101.html +432 -0
- data/samples/davidson_5K_20070505.html +395 -0
- data/sql/gooby.ddl +56 -0
- data/sql/gooby_load.dml +35 -0
- metadata +30 -32
- data/bin/20050305_corporate_cup_hm_to_csv.rb +0 -9
- data/bin/20050430_nashville_marathon_to_csv.rb +0 -9
- data/bin/20060115_phoenix_marathon_to_csv.rb +0 -9
- data/bin/activity_2007_03_10_13_02_32.xml_to_csv.rb +0 -9
- data/bin/example_usage.rb +0 -46
- data/bin/example_usage.sh +0 -52
- data/bin/gen_gap_phx.rb +0 -10
- data/bin/gen_gmap_cc_2005.rb +0 -10
- data/bin/gen_gmap_cc_2007.rb +0 -10
- data/bin/gen_gmap_nashville.rb +0 -10
- data/bin/gen_gmap_phx.rb +0 -10
- data/bin/phx_to_csv.rb +0 -47
- data/bin/split_forerunner_logbook_2007.rb +0 -10
- data/bin/split_training_center_2007.rb +0 -8
- data/data/2007_03_10.tcx +0 -28445
- data/data/activity_2007_03_10_13_02_32.csv +0 -1168
- data/data/activity_2007_03_10_13_02_32.xml +0 -11695
- data/data/forerunner_2007.xml +0 -31872
- data/data/geo_data.txt +0 -171
- data/pkg/code_header.txt +0 -21
- data/pkg/pkg.rb +0 -238
- data/pkg/test_header.txt +0 -19
- data/samples/20070310_corporate_cup_hm.html +0 -1367
- data/samples/gps_point_capture.html +0 -54
- data/samples/phoenix_marathon.html +0 -1596
- data/tests/ts_gooby.rb +0 -1109
- data/tests/ts_gooby_min.rb +0 -550
data/README
CHANGED
@@ -1,22 +1,20 @@
|
|
1
1
|
= Gooby = Google APIs + Ruby
|
2
2
|
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.1.0 - 2007/06/10
|
4
4
|
|
5
|
-
Gooby = Google APIs + Ruby. Release 1.
|
5
|
+
Gooby = Google APIs + Ruby. Release 1.1.0 generates Google maps from GPS data
|
6
6
|
exported by your Garmin Forerunner GPS unit, or manually edited CSV file.
|
7
|
-
Please see the README file. Feedback is requested.
|
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
|
7
|
+
Please see the README file. Feedback is requested.
|
13
8
|
|
14
|
-
|
15
|
-
|
9
|
+
Sample maps at:
|
10
|
+
http://www.joakim-systems.com:8219/gmap/
|
11
|
+
http://www.joakim-systems.com:8219/gmap/ccc_half_2005
|
12
|
+
http://www.joakim-systems.com:8219/gmap/nashville_marathon_2005
|
13
|
+
http://www.joakim-systems.com:8219/gmap/phoenix_marathon_2006
|
16
14
|
|
17
15
|
---
|
18
16
|
|
19
|
-
This
|
17
|
+
This gem contains 'Gooby', a set of Ruby code to assist you with using and
|
20
18
|
producing content for the various Google APIs. The initial focus of Gooby is
|
21
19
|
on the Google Maps API, version 2.0.
|
22
20
|
|
@@ -31,25 +29,16 @@ as created in one of the following three ways.
|
|
31
29
|
Google maps are applicable really to any outdoor activity for which GPS data
|
32
30
|
can be obtained. The focus of Gooby is on running, because the author is a
|
33
31
|
marathon runner, and the Garmin Forerunner (I use both models 201 and 205)
|
34
|
-
is primarily intended for running.
|
35
|
-
|
36
|
-
|
32
|
+
is primarily intended for running. Other activities, such as cycling, hiking,
|
33
|
+
walking, driving, and even golfing are also well suited for Gooby. Please let
|
34
|
+
me know how you use Gooby! Feedback is requested.
|
37
35
|
|
38
|
-
|
39
|
-
|
40
|
-
swimming Google Maps can also be created with Gooby. Please let me know how
|
41
|
-
you use Gooby! Feedback is requested.
|
42
|
-
|
43
|
-
All Gooby functionality is intended to be invoked from a command line.
|
44
|
-
Web and Rails integration may be done in a later release. See the example
|
45
|
-
usage section below.
|
46
|
-
|
47
|
-
See the Goals/Requirements and Usage sections below for the complete list of
|
48
|
-
Gooby functionality.
|
36
|
+
All Gooby functionality is intended to be invoked from a command line. Web
|
37
|
+
and Rails integration may be done in a later release.
|
49
38
|
|
50
39
|
= General
|
51
40
|
|
52
|
-
Author:: Chris Joakim <chris@
|
41
|
+
Author:: Chris Joakim <chris@joakim-systems.com>
|
53
42
|
Requires:: Ruby 1.8.0 or later
|
54
43
|
License:: Copyright 2007 by Chris Joakim.
|
55
44
|
GNU General Public License (GPL) license.
|
@@ -68,51 +57,81 @@ The latest version of gooby can be found at
|
|
68
57
|
|
69
58
|
Gooby is packaged and installed as a ruby 'gem'. Download the latest gem to
|
70
59
|
your computer, then run the following command from your download directory.
|
71
|
-
The -t flag will cause the Gooby regression test suite to be executed.
|
72
|
-
|
73
|
-
gem install gooby-1.0.0.gem
|
74
|
-
or
|
75
|
-
gem install gooby-1.0.0.gem -t
|
76
|
-
|
77
|
-
== Running the Gooby Test Suite
|
78
|
-
|
79
|
-
To execute the test suite, run the following command from the main 'gooby'
|
80
|
-
directory:
|
81
60
|
|
82
|
-
|
61
|
+
gem install gooby-1.1.0.gem
|
83
62
|
|
84
63
|
== Online Resources
|
85
64
|
|
86
65
|
* The Gooby home page http://rubyforge.org/projects/gooby/.
|
87
66
|
RubyForge provides CVS hosting for the project.
|
88
67
|
|
89
|
-
Sample Gooby-generated Google Maps are at www.
|
90
|
-
|
91
|
-
http://www.
|
92
|
-
|
93
|
-
http://www.
|
94
|
-
http://www.
|
95
|
-
http://www.
|
96
|
-
|
97
|
-
|
68
|
+
Sample Gooby-generated Google Maps are at www.joakim-systems.com, below:
|
69
|
+
|
70
|
+
http://www.joakim-systems.com:8219/gmap/
|
71
|
+
http://www.joakim-systems.com:8219/gmap/ccc_half_2005
|
72
|
+
http://www.joakim-systems.com:8219/gmap/nashville_marathon_2005
|
73
|
+
http://www.joakim-systems.com:8219/gmap/phoenix_marathon_2006
|
74
|
+
http://www.joakim-systems.com:8219/gmap/gps_data_capture
|
75
|
+
|
76
|
+
== This Release - 1.1.0
|
77
|
+
|
78
|
+
* Greatly simplify usage and command-line argument handling.
|
79
|
+
See the shell scripts and ruby files in the /bin directory for examples.
|
80
|
+
|
81
|
+
Special thanks to Davis Kitchel for his several suggestions that resulted
|
82
|
+
in the following enhancements:
|
83
|
+
|
84
|
+
* Gooby is a Garmin XML parser! The 'marketing' focus on Gooby prior to now
|
85
|
+
has been on Google Map generation. However, some users simply use it as
|
86
|
+
a Garmin XML to CSV parser, then use the parsed data for their own various
|
87
|
+
needs without creating a Google map. This release recognizes that simple
|
88
|
+
parsing of Garmin data is a significant and "core" use of Gooby.
|
89
|
+
|
90
|
+
* Reformatted the parsed CSV files and added more fields to each output
|
91
|
+
line, including a unique identifier (primary key), run_id, and lap-specific
|
92
|
+
info such as lap number, lap distance, and lap elapsed time.
|
93
|
+
|
94
|
+
* Renamed and enhanced yaml file 'gooby_config.yaml'. Previously, this had
|
95
|
+
been Google-map biased. This release allows you to define your own
|
96
|
+
"points of interest" (poi) in the yaml file. Furthermore, you can define
|
97
|
+
"courses" or "subcourses" which consist of a given series of points-of-
|
98
|
+
interest. See 'gooby_config.yaml' for examples.
|
99
|
+
|
100
|
+
* Added proximity-based "been_there" reporting logic (method 'been_there' of
|
101
|
+
class GoobyCommand). This functionality allows you to scan your CVS data
|
102
|
+
file(s) where you have been on user-specified "courses", within a given
|
103
|
+
proximity. Your courses are defined in the yaml file (see the above item).
|
104
|
+
Proximity is specified in "degrees difference" between the course point
|
105
|
+
definition coordinates, and the actual observed GPS coordinates. Degrees
|
106
|
+
difference is defined as the absolute value of lat1 - lat2, plus the
|
107
|
+
absolute value of lng1 - lng2.
|
108
|
+
|
109
|
+
For an example report, see file 'been_there.txt' in the /samples directory.
|
110
|
+
|
111
|
+
This functionality essentially lets you retroactively "click the Lap button"
|
112
|
+
on your Garmin GPS receiver and examine split-times between given points.
|
113
|
+
Typical usage is to examine "hill climb", "time trial", or "speedwork"
|
114
|
+
zones within your runs or rides.
|
115
|
+
|
116
|
+
* Optional support for loading your GPS data into a MySQL database. See the
|
117
|
+
generate and load scripts in the /sql directory.
|
98
118
|
|
119
|
+
Note that Gooby data does NOT need to be loaded into a database; the CSV
|
120
|
+
format is preferred. However, users may find it useful to store this data
|
121
|
+
in a database for their required processing.
|
99
122
|
|
100
123
|
=== Road Map / TODO List
|
101
124
|
|
102
125
|
* IE or Google Bug - The Google Map v2 JavaScript has not run properly in
|
103
126
|
Internet Explorer at times. Script error after loading the map background,
|
104
127
|
but before the map route is drawn.
|
105
|
-
|
106
|
-
* Incomplete - Google Map generation from your data/geo_data.txt file.
|
107
|
-
You can, however, provide your own data as a CSV file per the current
|
108
|
-
map generation design.
|
109
128
|
|
110
|
-
* Add
|
129
|
+
* Add Rails support for realtime dynamic map/content generation.
|
130
|
+
|
131
|
+
* Parse cadence and heartbeat information from Garmin export file for cyclists.
|
111
132
|
|
112
133
|
* Add other Google APIs (earth, search, sitemaps, froogle, etc).
|
113
134
|
|
114
|
-
* Add Rails support for realtime dynamic map/content generation.
|
115
|
-
|
116
135
|
== Support
|
117
136
|
|
118
137
|
Please see http://rubyforge.org/projects/gooby/ to submit a request or report
|
@@ -122,164 +141,109 @@ a bug, on the Tracker page.
|
|
122
141
|
|
123
142
|
= Usage
|
124
143
|
|
125
|
-
See
|
126
|
-
|
127
|
-
|
128
|
-
|
144
|
+
See the shell scripts and corresponding ruby files in the /bin directory for examples.
|
145
|
+
The following in-line text shows both the shell and ruby code.
|
146
|
+
|
147
|
+
Function 1 - Garmin XML/TCX file splitting:
|
148
|
+
-------------------------------------------
|
149
|
+
shell:
|
150
|
+
|
151
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_splitter.rb garmin201 /devtools/workspace/RF_Gooby/data/raw/forerunner_201_2007.xml /temp/splits
|
152
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_splitter.rb garmin205 /devtools/workspace/RF_Gooby/data/raw/forerunner_205_2007.tcx /temp/splits
|
129
153
|
|
130
|
-
|
131
|
-
It's free, and has to be included in every page which displays a map. See
|
132
|
-
the 'gmap_key' entry in 'gooby_options.yaml', which embeds your key value
|
133
|
-
into the generated html page. Also see the Google Maps API site -
|
134
|
-
http://www.google.com/apis/maps/
|
154
|
+
ruby:
|
135
155
|
|
156
|
+
require 'rubygems'
|
136
157
|
require 'gooby'
|
137
158
|
include REXML
|
138
159
|
|
139
|
-
|
140
|
-
gooby = Gooby::GoobyCommand.new
|
160
|
+
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
141
161
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
options = gooby.options(options_file)
|
162
|
+
gooby = Gooby::GoobyCommand.new(config_filename)
|
163
|
+
gooby.display_version
|
164
|
+
gooby.split_garmin_export_file(ARGV)
|
146
165
|
|
147
|
-
# Optionally display some of its values.
|
148
|
-
n = 'gmap_approx_max_points'
|
149
|
-
v = options.get(n)
|
150
|
-
puts "option '#{n}' = #{v}"
|
151
166
|
|
152
|
-
|
153
|
-
|
154
|
-
|
167
|
+
Function 2 - Garmin XML/TCX file parsing:
|
168
|
+
-----------------------------------------
|
169
|
+
shell:
|
155
170
|
|
156
|
-
|
157
|
-
|
171
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_parser.rb garmin201 /devtools/workspace/RF_Gooby/data/raw/forerunner_201_2007.xml >
|
172
|
+
/devtools/workspace/RF_Gooby/data/2007_g201.csv
|
173
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_parser.rb garmin205 /devtools/workspace/RF_Gooby/data/raw/forerunner_205_2007.tcx >
|
174
|
+
/devtools/workspace/RF_Gooby/data/2007_g205.csv
|
175
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_parser.rb garmin201 /devtools/workspace/RF_Gooby/data/20060115_phoenix_marathon.xml >
|
176
|
+
/devtools/workspace/RF_Gooby/data/20060115_phoenix_marathon.csv
|
158
177
|
|
159
|
-
|
160
|
-
# You may want to redirect this output to a file.
|
161
|
-
gooby.parse_garmin_forerunner_logbook_xml 'data/run_2007_01_01_16_38_27.xml' if true
|
178
|
+
ruby:
|
162
179
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
# Generate a Google Map from your CSV file data, and the Options per
|
167
|
-
# your yaml file. You may also wish to redirect this output to a file.
|
168
|
-
gooby.generate_google_map('data/phx.csv', options) if true
|
169
|
-
|
170
|
-
|
171
|
-
== Goals / Requirements
|
172
|
-
|
173
|
-
=== Functional Requirements
|
174
|
-
|
175
|
-
f1. Provide the ability to parse exported XML GPS data files from the Garmin
|
176
|
-
ForerunnerLogbook software. ForerunnerLogbook is used in conjunction
|
177
|
-
with the Garmin Forerunner 201 GPS receiver. Parse the XML into less-
|
178
|
-
verbose and more readable and editable CSV format.
|
179
|
-
|
180
|
-
status = complete
|
180
|
+
require 'rubygems'
|
181
|
+
require 'gooby'
|
182
|
+
include REXML
|
181
183
|
|
182
|
-
|
183
|
-
TrainingCenter software. TrainingCenter is used in conjunction with
|
184
|
-
newer Garmin GPS receivers, such as model 205 and 305. Parse the TCX
|
185
|
-
file (XML format) into less-verbose and more readable and editable CSV
|
186
|
-
format.
|
184
|
+
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
187
185
|
|
188
|
-
|
186
|
+
gooby = Gooby::GoobyCommand.new(config_filename)
|
187
|
+
gooby.parse_garmin_xml_file(ARGV)
|
189
188
|
|
190
|
-
f3. Provide the ability to "split" a large Garmin ForerunnerLogbook XML file
|
191
|
-
containing many "runs" into individual "run_" files. The individual
|
192
|
-
files can then be processed separately, and can optionally be stored in
|
193
|
-
your personal records directory or source control system.
|
194
|
-
|
195
|
-
status = complete
|
196
|
-
|
197
|
-
f4. Provide the ability to "split" a large Garmin TrainingCenter TCX/XML file
|
198
|
-
containing many "activities" into individual "activity_" files. The
|
199
|
-
individual files can then be processed separately, and can optionally be
|
200
|
-
stored in your personal records directory or source control system.
|
201
189
|
|
202
|
-
|
190
|
+
Function 3 - "been_there":
|
191
|
+
--------------------------
|
192
|
+
shell:
|
203
193
|
|
204
|
-
|
205
|
-
data in CSV text format, using the Google Map API v2.0. The generated
|
206
|
-
content should be viewable in most current web browsers, including Apple
|
207
|
-
Safari 2, Firefox 1.5, and Windows Internet Explorer 6.
|
208
|
-
|
209
|
-
status = complete
|
210
|
-
|
211
|
-
f6. Provide the ability (i.e. - an Internet web page) for a user to easily
|
212
|
-
obtain GPS coordinates for their particular POI, segments, and routes.
|
213
|
-
|
214
|
-
See http://www.joakimsoftware.com/gmap/gps_point_capture.html and also
|
215
|
-
file gps_point_capture.html in the gem. Modify this file for your site
|
216
|
-
as necessary.
|
217
|
-
|
218
|
-
status = complete
|
219
|
-
|
220
|
-
f7. Provide the ability to alter appropriate Gooby behavior via a simple
|
221
|
-
configuration file (i.e. - gooby_options.yaml) rather than modifying
|
222
|
-
the source code. Specific configuration requirements are:
|
223
|
-
a. Allow the user to specify roughly how many points appear on a map.
|
224
|
-
b. Allow the user to specify a distance unit-of-measure in either
|
225
|
-
miles, kilometers, or yards.
|
226
|
-
|
227
|
-
status = complete
|
228
|
-
|
229
|
-
f8. Provide adequate user documentation and scripts, so that someone other
|
230
|
-
than the author can actually use Gooby.
|
194
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_been_there.rb > /devtools/workspace/RF_Gooby/samples/been_there.txt
|
231
195
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
196
|
+
ruby:
|
197
|
+
|
198
|
+
require 'rubygems'
|
199
|
+
require 'gooby'
|
200
|
+
include REXML
|
237
201
|
|
238
|
-
|
239
|
-
----------------------------------------------------------------
|
202
|
+
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
240
203
|
|
241
|
-
|
242
|
-
segments, and routes as a collection of GPS data in a simple text file.
|
243
|
-
Allow "routes" to be composed from "reusable route segments", and
|
244
|
-
annotated with your own POI.
|
204
|
+
gooby = Gooby::GoobyCommand.new(config_filename)
|
245
205
|
|
246
|
-
|
247
|
-
|
206
|
+
# first read the csv file(s) parsed from your Garmin export tcx/xml files.
|
207
|
+
csv_list = Array.new
|
208
|
+
csv_list << "/devtools/workspace/RF_Gooby/data/2007_g201.csv" # csv file produced from Garmin 201
|
209
|
+
csv_list << "/devtools/workspace/RF_Gooby/data/2007_g205.csv" # csv file produced from Garmin 205
|
248
210
|
|
249
|
-
|
211
|
+
# read_csv_files has an optional second arg to display the specified formatted record number (i.e. - (csv_list,3) ).
|
212
|
+
gooby.read_csv_files(csv_list, 3)
|
250
213
|
|
251
|
-
|
214
|
+
gooby.been_there('333', 0.0025) # course 333 doesn't exist
|
252
215
|
|
216
|
+
# first arg to 'been_there' is the course number, second arg is the 'proximity' specified as
|
217
|
+
# 'degrees difference'. Degrees difference is defined as the absolute value of lat1 - lat2,
|
218
|
+
# plus the absolute value of lng1 - lng2. Your courses and points of interest (poi) are defined
|
219
|
+
# in the yaml file.
|
253
220
|
|
254
|
-
|
221
|
+
gooby.been_there('1', 0.0025)
|
222
|
+
gooby.been_there('2', 0.0025)
|
223
|
+
gooby.been_there('3', 0.0025)
|
224
|
+
gooby.been_there('4', 0.0025)
|
225
|
+
gooby.been_there('10', 0.0025)
|
255
226
|
|
256
|
-
t1. Conform to consistent coding and naming standards throughout the code.
|
257
227
|
|
258
|
-
|
259
|
-
|
228
|
+
Function 4 - Google Map Generation:
|
229
|
+
-----------------------------------
|
260
230
|
|
261
|
-
|
262
|
-
|
231
|
+
shell:
|
232
|
+
|
233
|
+
ruby /devtools/workspace/RF_Gooby/bin/gooby_gen_gmap.rb /devtools/workspace/RF_Gooby/data/20050430_nashville_marathon.csv >
|
234
|
+
/devtools/workspace/RF_Gooby/samples/20050430_nashville_marathon.html
|
263
235
|
|
264
|
-
|
265
|
-
tested classes/modules evolve, the corresponding test class will
|
266
|
-
similarly automatically evolve. New test method "stubs" will be
|
267
|
-
created, obsolete methods will be flagged, and current test method
|
268
|
-
implementations will be retained. Writing tests shouldn't hurt.
|
236
|
+
ruby:
|
269
237
|
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
c. Leverage Ruby tracing functionality.
|
238
|
+
require 'rubygems'
|
239
|
+
require 'gooby'
|
240
|
+
include REXML
|
274
241
|
|
275
|
-
|
276
|
-
use local SCM during the initial development.
|
277
|
-
|
278
|
-
t7. Implement a Ruby-standard directory structure - bin, data, lib, tests,
|
279
|
-
etc.
|
242
|
+
config_filename = '/devtools/workspace/RF_Gooby/config/gooby_config.yaml'
|
280
243
|
|
281
|
-
|
282
|
-
|
244
|
+
gooby = Gooby::GoobyCommand.new(config_filename)
|
245
|
+
gooby.generate_google_map(ARGV)
|
246
|
+
|
283
247
|
|
284
248
|
== Warranty
|
285
249
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
The following are sample command line arguments demonstrating the usage of Gooby.
|
3
|
+
Three programs are involved - gooby_splitter.rb, gooby_parser.rb, and gooby_gen_gmap.rb.
|
4
|
+
|
5
|
+
Please see each of these three files for programatic use of Gooby.
|
6
|
+
|
7
|
+
--------------------
|
8
|
+
|
9
|
+
gooby_splitter.rb splits a large Garmin Export file into several individual run or activity
|
10
|
+
files. The output *.xml file names are based on start time of the run or activity per
|
11
|
+
the GPS data.
|
12
|
+
|
13
|
+
> ruby bin/gooby_splitter.rb garmin205 data/raw/20070602.tcx /temp/splits
|
14
|
+
|
15
|
+
command line args:
|
16
|
+
the first arg, format, should be one of: garmin201, garmin205, garmin305, etc.
|
17
|
+
the second arg is the input filename - which is a garmin export file.
|
18
|
+
the third arg is the output directory where the split files are written to.
|
19
|
+
|
20
|
+
--------------------
|
21
|
+
|
22
|
+
gooby_parser.rb parses one of the *.xml files produced by the above gooby_splitter.rb, into a CSV file.
|
23
|
+
The CSV file is a simpler and more useful format for most needs. This CSV file is used
|
24
|
+
by the gooby_gen_gmap.rb program, described below.
|
25
|
+
|
26
|
+
You should redirect the output of gooby_parser.rb to the file of your choice.
|
27
|
+
|
28
|
+
> ruby bin/gooby_parser.rb garmin201 data/20050305_corporate_cup_hm.xml > data/20050305_corporate_cup_hm.csv
|
29
|
+
> ruby bin/gooby_parser.rb garmin201 data/20050430_nashville_marathon.xml > data/20050430_nashville_marathon.csv
|
30
|
+
> ruby bin/gooby_parser.rb garmin201 data/20060115_phoenix_marathon.xml > data/20060115_phoenix_marathon.csv
|
31
|
+
> ruby bin/gooby_parser.rb garmin205 data/activity_2007_05_05_12_28_32.xml > data/20070505_Davidson_5K.csv
|
32
|
+
> ruby bin/gooby_parser.rb garmin205 data/activity_2007_06_02_11_06_06.xml > data/20070602_11Miler.csv
|
33
|
+
|
34
|
+
command line args:
|
35
|
+
the first arg, format, should be one of: garmin201, garmin205, garmin305, etc.
|
36
|
+
the second arg, input xml filename, was produced by the Gooby 'gooby_splitter.rb' program.
|
37
|
+
|
38
|
+
--------------------
|
39
|
+
|
40
|
+
gooby_gen_gmap.rb generates a HTML file which represents a Google Map for the given CSV data.
|
41
|
+
The CSV file was produced by the above gooby_parser.rb program. Note that you can also
|
42
|
+
manually edit your own CSV file with your data, and pass this file to gooby_gen_gmap.rb.
|
43
|
+
|
44
|
+
You should redirect the output of gooby_gen_gmap.rb to the file of your choice.
|
45
|
+
|
46
|
+
> ruby bin/gooby_gen_gmap.rb data/20050305_corporate_cup_hm.csv > samples/20050305_corporate_cup_hm.html
|
47
|
+
> ruby bin/gooby_gen_gmap.rb data/20050430_nashville_marathon.csv > samples/20050430_nashville_marathon.html
|
48
|
+
> ruby bin/gooby_gen_gmap.rb data/20060115_phoenix_marathon.csv > samples/20060115_phoenix_marathon.html
|
49
|
+
> ruby bin/gooby_gen_gmap.rb data/20070505_Davidson_5K.csv > samples/20070505_Davidson_5K.html
|
50
|
+
> ruby bin/gooby_gen_gmap.rb data/20070602_11miler.csv > samples/20070602_11miler.html
|
51
|
+
|
52
|
+
command line args:
|
53
|
+
the first arg, csv filename, was produced by the Gooby 'gooby_parser.rb' program, or manually edited.
|
54
|
+
|
55
|
+
|