postrunner 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -12
- data/lib/postrunner/FitFileStore.rb +12 -38
- data/lib/postrunner/Main.rb +0 -1
- data/lib/postrunner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3556713751664059a4127db7acc897c02def6807bb6a6e8ca6fdf3518c8cea7
|
4
|
+
data.tar.gz: 6a2f8b002487a379afa8c46cc58b0cc109fcd950f8abf740e79dffb004d7e865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3b69049465aa888afd5ca4191ab5b75b1235db7b0cd3e4de3171519dfa6c63c98a5d2300bc45e3592a531c205a91fd3a028b1bedbc4c29b716fc9d6265a8402
|
7
|
+
data.tar.gz: 01bce18ad81578364eb7c4087fcce790e5025dc6c6d7f336c62001f99327944910991fcfd83493e1c238f16a90385a0e79c5cb95b750b9a883f5acab2091ff77
|
data/README.md
CHANGED
@@ -2,26 +2,50 @@
|
|
2
2
|
|
3
3
|
PostRunner is an application to manage FIT files such as those
|
4
4
|
produced by Garmin products like the Forerunner 620 (FR620),
|
5
|
-
Forerunner 25 (FR25), Fenix 3, Fenix 3HR
|
6
|
-
import the files from the device and analyze the
|
7
|
-
the common features like plotting pace, heart
|
8
|
-
other captured values it also provides a heart
|
9
|
-
analysis. It can also update satellite orbit
|
10
|
-
the device to speed-up GPS fix times.
|
11
|
-
|
12
|
-
|
5
|
+
Forerunner 25 (FR25), Fenix 3, Fenix 3HR, Fenix 5, Fenix 5+ or Fenix6.
|
6
|
+
It allows you to import the files from the device and analyze the
|
7
|
+
data. In addition to the common features like plotting pace, heart
|
8
|
+
rates, elevation and other captured values it also provides a heart
|
9
|
+
rate variability (HRV) analysis. It can also update satellite orbit
|
10
|
+
prediction (EPO) data on the device to speed-up GPS fix times.
|
11
|
+
Unfortunately, the download mechanism for CPE files used by the
|
12
|
+
devices with GPS chipsets from Sony is still unknown and hence
|
13
|
+
unsupported. Postrunner is an offline alternative to Garmin Connect.
|
14
|
+
The software has been developed and tested on Linux but should work on
|
15
|
+
other operating systems as well.
|
13
16
|
|
14
17
|
## Installation
|
15
18
|
|
16
19
|
PostRunner is a [http://www.ruby-lang.org](Ruby) application. You need
|
17
|
-
to have a Ruby 2.
|
20
|
+
to have a Ruby 2.4 or later runtime environment installed. This
|
18
21
|
application was developed and tested on Linux but may work on other
|
19
|
-
operating systems as well.
|
22
|
+
operating systems as well. You can either install it as root for all
|
23
|
+
users on the computer or as a particular user for just this user.
|
24
|
+
|
25
|
+
### System-wide installation as root user
|
20
26
|
|
21
27
|
```
|
22
28
|
$ gem install postrunner
|
23
29
|
```
|
24
30
|
|
31
|
+
On some Linux distributions using sudo might resolve in permission
|
32
|
+
problems as the installed packages are not readable for normal users.
|
33
|
+
This typically results in 'cannot load such file' type error messages.
|
34
|
+
|
35
|
+
### Installation as non-privileged user
|
36
|
+
|
37
|
+
```
|
38
|
+
gem install --user-install postrunner
|
39
|
+
```
|
40
|
+
|
41
|
+
This will install PostRunner and all dependency packages in your .gem
|
42
|
+
directory. You then need to add the binary path to your PATH variable
|
43
|
+
in your .profile or .bashrc or .whatever file. The path is typically
|
44
|
+
.gem/ruby/<version>/bin. Watch out, on some Linux distributions the
|
45
|
+
version number of ruby gets added to the binary name, e. g.
|
46
|
+
postrunner.ruby2.7. You can use a symbolic link or alias to safe some
|
47
|
+
typing.
|
48
|
+
|
25
49
|
## Usage
|
26
50
|
|
27
51
|
### Importing FIT files
|
@@ -29,7 +53,7 @@ $ gem install postrunner
|
|
29
53
|
To get started you need to connect your device to your computer and
|
30
54
|
mount it as a disk drive. Only devices that expose their data as FAT file
|
31
55
|
system are supported. Older devices use proprietary drivers and are
|
32
|
-
not supported by
|
56
|
+
not supported by PostRunner. Once the device is mounted find out the
|
33
57
|
full path to the directory that contains your FIT files. You can then
|
34
58
|
import all files on the device.
|
35
59
|
|
@@ -128,7 +152,7 @@ $ postrunner show :1
|
|
128
152
|
## Contributing
|
129
153
|
|
130
154
|
PostRunner is currently work in progress. It does some things I want
|
131
|
-
with files from my Garmin
|
155
|
+
with files from my Garmin devices. It's certainly possible to do more
|
132
156
|
things and support more devices. Patches are welcome!
|
133
157
|
|
134
158
|
1. Fork it ( https://github.com/scrapper/postrunner/fork )
|
@@ -502,46 +502,20 @@ module PostRunner
|
|
502
502
|
return nil
|
503
503
|
end
|
504
504
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
return {
|
515
|
-
:manufacturer => di.manufacturer,
|
516
|
-
:product => di.garmin_product || di.product,
|
517
|
-
:numeric_manufacturer => di.numeric_manufacturer,
|
518
|
-
:numeric_product => di.numeric_product,
|
519
|
-
:serial_number => di.serial_number
|
520
|
-
}
|
521
|
-
end
|
505
|
+
fit_entity.device_infos.each do |di|
|
506
|
+
if di.device_index == 0
|
507
|
+
return {
|
508
|
+
:manufacturer => di.manufacturer,
|
509
|
+
:product => di.garmin_product || di.product,
|
510
|
+
:numeric_manufacturer => di.numeric_manufacturer,
|
511
|
+
:numeric_product => di.numeric_product,
|
512
|
+
:serial_number => di.serial_number || 0
|
513
|
+
}
|
522
514
|
end
|
523
|
-
Log.error "Fit entity has no device info for 0"
|
524
|
-
return nil
|
525
|
-
else
|
526
|
-
# And for all properly developed devices we can just look at the
|
527
|
-
# file_id section.
|
528
|
-
if fid.manufacturer.nil? ||
|
529
|
-
fid.manufacturer[0..'Undocumented value'.length - 1] ==
|
530
|
-
'Undocumented value'
|
531
|
-
Log.error "Cannot store FIT files for unknown manufacturer " +
|
532
|
-
fid.manufacturer
|
533
|
-
return nil
|
534
|
-
end
|
535
|
-
fid.serial_number ||= 0
|
536
|
-
|
537
|
-
return {
|
538
|
-
:manufacturer => fid.manufacturer,
|
539
|
-
:product => fid.garmin_product || fid.product,
|
540
|
-
:numeric_manufacturer => di.numeric_manufacturer,
|
541
|
-
:numeric_product => di.numeric_product,
|
542
|
-
:serial_number => fid.serial_number
|
543
|
-
}
|
544
515
|
end
|
516
|
+
|
517
|
+
Log.error "Fit entity has no device info for 0"
|
518
|
+
return nil
|
545
519
|
end
|
546
520
|
|
547
521
|
def register_device(long_uid)
|
data/lib/postrunner/Main.rb
CHANGED
data/lib/postrunner/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postrunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schlaeger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fit4ruby
|