recorder/contrib/gpx-to-rec
Benjamin Michaelis 8e6f7f3d5a
fix: Rename gpx_to_rec.py to gpx-to-rec.py
This file name now matches the associated [README](https://github.com/owntracks/recorder/blob/master/contrib/gpx-to-rec/README.md) so that the instructions execute properly.
2023-09-20 19:17:01 +01:00
..
gpx-to-rec.py fix: Rename gpx_to_rec.py to gpx-to-rec.py 2023-09-20 19:17:01 +01:00
README.md Improve GPX-Import 2023-05-17 16:50:01 +02:00

gpx-to-rec.py

This script attempts to convert the specified gpx files into rec files to be used with recorder.

Installation

gpx-to-rec.py depends on gpxpy which you can install with pip:

pip install gpxpy

Usage

The script takes one or more .gpx files as arguments and creates .rec files in the current working directory. Example:

python3 gpx-to-rec.py my_track.gpx [my_other_track.gpx ...]

You can then copy those .rec files to recorder's storage location for the corresponding user and device. By default it's in /var/spool/owntracks/recorder/store/rec/<username>/<device>. Make sure to change <username> and <device> to your usecase. After copying the files over, make sure that recorder has permissions to write to them:

sudo chown owntracks:owntracks /var/spool/owntracks/recorder/store/rec/<username>/<device>/*

Again, edit the command for your usecase. In my case, recorder uses a separate user named owntracks, which is why I needed to change the owner.

And there you have it. Now every point from your gpx file should be displayed on, for example, frontend.