All Projects → jedie → django-for-runners

jedie / django-for-runners

Licence: GPL-3.0 license
Store your GPX tracks of your running (or other sports activity) in django.

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to django-for-runners

trackanimation
Track Animation is a Python 2 and 3 library that provides an easy and user-adjustable way of creating visualizations from GPS data.
Stars: ✭ 74 (+51.02%)
Mutual labels:  gpx, gps-tracking
wp-plugin-trackserver
A WordPress plugin for GPS tracking and publishing
Stars: ✭ 34 (-30.61%)
Mutual labels:  gpx, gps-tracking
GPS-Video-Logger
Android App to record video and track GPS data simultaneously. GPS Logger with Video. GPS and video recording.
Stars: ✭ 17 (-65.31%)
Mutual labels:  gpx, gps-tracking
X-TRACK
A GPS bicycle speedometer that supports offline maps and track recording
Stars: ✭ 3,736 (+7524.49%)
Mutual labels:  gpx, gps-tracking
xavc rtmd2srt
Extract real time meta-data and GPS tracks from Sony XAVC video
Stars: ✭ 29 (-40.82%)
Mutual labels:  gpx, gps-data
GpsPrune
GpsPrune is a map-based application for viewing, editing and converting coordinate data from GPS systems.
Stars: ✭ 46 (-6.12%)
Mutual labels:  gpx, gps-data
TET
TET- Trans Euro Trail - Public Files
Stars: ✭ 27 (-44.9%)
Mutual labels:  gpx
nrc-exporter
Download your runs data from Nike Run Club and convert it to GPX format that can be imported in other running apps.
Stars: ✭ 78 (+59.18%)
Mutual labels:  gpx
stravaV10
Open source bike GPS: with Strava segments !
Stars: ✭ 34 (-30.61%)
Mutual labels:  gpx
geospatial-storytelling
Visualization of gps tracking data
Stars: ✭ 20 (-59.18%)
Mutual labels:  gps-data
Strava-local-heatmap
Python script to generate a high resolution heatmap from Strava GPX files
Stars: ✭ 102 (+108.16%)
Mutual labels:  gpx
Avenue-GPX-Viewer
A simple and easy GPX viewer for macOS.
Stars: ✭ 42 (-14.29%)
Mutual labels:  gpx
garmin-connect-export
Downloads gpx, tcx or original fit files from your Garmin Connect Account.
Stars: ✭ 42 (-14.29%)
Mutual labels:  gpx
PopRun
跑鸭:这是我的毕业设计,“跑鸭”微信小程序-一款基于校园跑步的社交小程序(实时里程配速、运动路径、整公里提醒、周榜月榜、打卡分享、热门推荐、线上活动、勋章墙、隐私设置),技术栈:Vant-Weapp UI、Laravel+MySQL
Stars: ✭ 64 (+30.61%)
Mutual labels:  running
gpx-converter
python package for manipulating gpx files and easily converting gpx to other different formats
Stars: ✭ 54 (+10.2%)
Mutual labels:  gpx
LocationMapViewer
Android App to view Locations in a map with support for gpx, kml and kmz data
Stars: ✭ 31 (-36.73%)
Mutual labels:  gpx
strava-uploader
utility to migrate Runkeeper data (GPX and CSV) to Strava
Stars: ✭ 72 (+46.94%)
Mutual labels:  gpx
gc-gpx-viewer
Geocaching GPX Viewer is a web app to display caches from a gpx file on a map.
Stars: ✭ 24 (-51.02%)
Mutual labels:  gpx
RollingFunctions.jl
Roll a window over data; apply a function over the window.
Stars: ✭ 89 (+81.63%)
Mutual labels:  running
GPXParser.js
GPX file parser javascript library
Stars: ✭ 58 (+18.37%)
Mutual labels:  gpx

Django-ForRunners

Logo Store your GPX tracks of your running (or other sports activity) in django.

pytest Coverage Status on codecov.io django_yunohost_integration @ PyPi Python Versions License GPL

(The name Django-ForRunners has the origin from the great Android tracking app ForRunners by Benoît Hervier: http://rvier.fr/#forrunners )

Features:

  • GPX track management:

    • Upload GPX tracks
    • Import GPX tracks from commandline
    • Track analysis:
      • basics: Track length / Duration / Pace / Hart rate Up-/Downhill
      • Display route on OpenStreetMap map
      • Graphs with elevation / heart rate / cadence (if available in GPX data)
    • Data that is automatically extracted from the web:
      • Start/finish Address from OpenStreetMap
      • Start/finish weather information from metaweather.com
    • Store additional data:
      • Ideal track distance (for easier grouping/filtering tracks)
  • sports competitions Management:

    • Create a List of Sport Events
      • Add participation to a event
      • link GPX track with a event participation
      • Store you event participation:
        • official track length
        • measured finisher time
        • Number of participants who have finished in your discipline
      • Add links to webpages relatet to this event
      • Record costs (entry fee, T-shirt etc.)
  • common

    • Multiple user support (However: no rights management and currently only suitable for a handful of users)
  • Install as YunoHost App via django-for-runners_ynh

Developer information

prepare

~$ git clone https://github.com/jedie/django-for-runners.git
~$ cd django-for-runners/
~/django-for-runners$ make
_________________________________________________________________
DjangoForRunners - *dev* Makefile

install-poetry         install or update poetry
install                install DjangoForRunners via poetry
manage-update          Collectstatic + makemigration + migrate
update                 update the sources and installation
tox-listenvs           List all tox test environments
tox                    Run pytest via tox with all environments
tox-py36               Run pytest via tox with *python v3.6*
tox-py37               Run pytest via tox with *python v3.7*
tox-py38               Run pytest via tox with *python v3.8*
pytest                 Run pytest
publish                Release new version to PyPi
run-dev-server         Run the django dev server in endless loop.
createsuperuser        Create super user
messages               Make and compile locales message files
dbbackup               Backup database
dbrestore              Restore a database backup
run-docker-dev-server  Start docker containers with current dev source code

local development installation

# install or update Poetry:
~/django-for-runners$ make install-poetry

# install  Django-ForRunners via poetry:
~/django-for-runners$ make install
...

# Collectstatic + makemigration + migrate:
~/django-for-runners$ make manage-update

# Create a django super user:
~/django-for-runners$ ./manage.sh createsuperuser

# start local dev. web server:
~/django-for-runners$ make run-dev-server

The web page is available in Port 8000, e.g.: http://127.0.0.1:8000/

import GPX files

e.g.:

~/django-for-runners$ poetry run manage import_gpx --username <django_username> ~/backups/gpx_files

Note: It is no problem to start import_gpx with the same GPX files: Duplicate entries are avoided. The start/finish (time/latitude/longitude) are compared.

backup

Create a backup into .../backups/<timestamp>/ e.g.:

~/django-for-runners$ poetry run for_runners backup

The backup does:

  • backup the database
  • export all GPX tracks
  • generate .csv files:
  • a complete file with all running tracks
  • one file for every user

regenerate all SVG files

~/django-for-runners$ poetry run for_runners recreate-svg

Screenshots

(All screenshots are here: github.com/jedie/jedie.github.io/tree/master/screenshots/django-for-runners)

for-runers v0.6.0 2018-07-31 GPX Track.png

for-runers v0.6.0 2018-07-31 GPX Track.png

for-runners v0.4.0 2018-6-26 GPX info.png

for-runners v0.4.0 2018-6-26 GPX info.png

for-runners v0.6.0 2018-07-19 Event Costs.png

for-runners v0.6.0 2018-07-19 Event Costs.png

print a small overview

for-runners v0.10.0 2010-06-26 print small overview 1.png

for-runners v0.10.0 2010-06-26 print small overview 2.png

run tests

~/Django-ForRunners$ make test

or:

~/Django-ForRunners$ make tox

Note:

To run all tests, you need:

  • Chromium Browser WebDriver e.g.: apt install chromium-chromedriver
  • Firefox Browser WebDriver aka geckodriver

install geckodriver e.g.:

~$ cd /tmp
/tmp$ wget https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz -O geckodriver.tar.gz
/tmp$ sudo sh -c 'tar -x geckodriver -zf geckodriver.tar.gz -O > /usr/bin/geckodriver'
/tmp$ sudo chmod +x /usr/bin/geckodriver
/tmp$ rm geckodriver.tar.gz
/tmp$ geckodriver --version
geckodriver 0.20.1
...

some notes

GPX storage

Currently we store the unchanged GPX data in a TextField.

static files

We collect some JavaScript files, for easier startup. These files are:

Project Homepage License storage directory
leafletjs.com Leaflet licensed under BSD for_runners/static/leaflet/
dygraphs.com dygraphs licensed under MIT for_runners/static/dygraphs/
chartjs.org Chart.js licensed under MIT for_runners/static/chartjs/

Precision of coordinates

GPX files from Garmin (can) contain:

  • latitude with 29 decimal places
  • longitude with 28 decimal places
  • elevation with 19 decimal places

The route on OpenStreetMap does not look more detailed, with more than 5 decimal places.

See also: https://wiki.openstreetmap.org/wiki/Precision_of_coordinates

Django compatibility

django-for-runners django version python
>=v0.15.0 3.2, 4.0, 4.1 3.7, 3.8, 3.9, 3.10
>=v0.14.0 3.2 3.7, 3.8, 3.9, 3.10
>=v0.12.0 2.2 3.7, 3.8, 3.9, 3.10
>=v0.11.0 2.2 3.7, 3.8, 3.9
>=v0.7.1 2.1 3.5, 3.6, 3.7
v0.5.x 2.0 3.5, 3.6, 3.7

(See also combinations in tox.ini and github actions)

Backwards-incompatible changes

Older changes, see:

https://github.com/jedie/django-for-runners/blob/v0.10.1/README.creole#backwards-incompatible-changes

history

  • dev
    • NEW: Attach files and images to "Event Participations"
    • tbc
  • 29.09.2022 - v0.15.0:
    • Update requirements
    • Activate auto login for local dev. server, for easier developing.
    • Test against different Django Versions: 3.2, 4.0 and 4.1
    • Replace creole README with Markdown
  • 16.08.2022 - v0.14.0:
    • Update to Django v3.2
    • Bugfix backup manage command
  • 15.04.2022 - v0.13.0:
    • Switch git branch from "master" to "main"
    • Remove "/development/" and mode "/src/"
    • update requirements
  • 22.11.2021 - v0.12.1:
    • update requirements
  • 17.01.2021 - v0.12.0:
  • 04.07.2020 - v0.11.0:
    • refactor gpx import code
    • update tests
    • Use poetry and add Makefile
    • update code style
  • 09.08.2019 - v0.10.1:
    • Enhance "Event Participation" admin view: Add start date and costs in table
  • 26.06.2019 - v0.10.0:
    • NEW: GPX Admin action to print a small overview from one or a few tracks
    • Accept optional server bind address, e.g.: for_runners run-server 127.0.0.1:8080
  • 02.04.2019 - v0.9.0:
    • NEW: Update complete environment installation with: for_runners update
    • Move the SQlite database to virtualenv root dir, e.g.: ~/Django-ForRunners/Django-ForRunners-database.sqlite3
    • NEW: save every gpx track to disk
    • NEW: Backup/export via cli: $ for_runners backup
    • NEW: export GPX Data via django-import-export
    • Create xdg-open desktop starter under linux here: ~/Django-ForRunners/Django-ForRunners
    • refactor the startup process:
      • auto loop the server process
      • open web browser on first start
      • enable autotask
    • rename for_runners_test_project to for_runners_project
  • 03.09.2018 - v0.8.1:
    • Fix "try-out" section in README, again ;(
  • 03.09.2018 - v0.8.0:
    • NEW: shell script for easier boot/install, see above
  • 02.09.2018 - v0.7.1:
    • Update to Django 2.1
    • Bugfix Tests
  • 02.09.2018 - v0.7.0:
    • Use dygraphs in GPX Track change admin view
    • Sync mouse over from Elevation/Headrate/Cadence dygraphs to leaflet open streep map
    • Fix "try-out" section in README (Thanks adsworth for reporting)
    • Add links from gpx tracks to other admin change view
    • Bugfixes
    • internals:
      • refactor stuff around track duration/length
      • move manipluation of list_display and list_filter contributed by adsworth
  • 19.07.2018 - v0.6.0:
    • NEW: event participation
    • NEW: costs of event participation (e.g.: entry fee for the competition, cost of a T-Shirt etc.)
    • NEW: Display statistics of events/costs per user and total
  • 04.07.2018 - v0.5.0:
    • remove Django-CMS
    • update to Django v2.0
    • NOTE: The migrations are simply replaced! So you must delete your database, e.g.: src/django-for-runners$ rm test_project_db.sqlite3
    • Add 'net duration' field, for the officially measured time and use it for calculations if available.
    • Create django manage command to fill some base data: $ ./manage.py fill_basedata
    • speedup by deactivating some django debug toolbar panels
  • 26.06.2018 - v0.4.0:
    • combine track filters with statistic views
    • NEW: GPX info (See length, point count and Average distance in meters between the points)
    • NEW: Display GPX metadata
    • Add 'creator' to every track and use it as changelist filter
    • remove Streetmap image generated via geotiler
    • Speedup by using a cache for gpxpy instances
  • 23.06.2018 - v0.3.0:
    • Start adding statistics (See screenshot above)
    • add weather information from metaweather.com to every track
  • 21.06.2018 - v0.2.0:
    • Display elevations, heart_rates and cadence_values if available
    • Add kilometer markers to OpenStreetMap
  • 15.06.2018 - v0.1.1:
    • a few bugfixes
  • 15.06.2018 - v0.1.0:
    • Render interactive OpenStreetMap track map with Leaflet JS
  • 12.06.2018 - v0.0.4:
    • Better Events model
    • GPX error handling
    • more tests
    • Bugfix for Python 3.5 (Geotiler needs Python 3.6 or later)
  • 12.06.2018 - v0.0.3:
    • display min/average/max heart rate
    • use autotask to generate the MAP in background
  • 31.05.2018 - v0.0.2:
    • generate SVG 'icon' from GPX track
  • v0.0.1 - 30.05.2018
    • Just create a pre-alpha release to save the PyPi package name ;)

links

| Homepage | http://github.com/jedie/django-for-runners | | PyPi | https://pypi.org/project/django-for-runners/ |

activity exporter

It's sometimes hard to find a working project for exporting activities. So here tools that i use currently:

alternatives (OpenSource only)

Online tools:

credits

The whole thing is based on many excellent projects. Especially the following:

donation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].