Skip to content

danieldean/tour_de_dartford

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tour de Dartford

Script to automatically collect club leaderboard data from Strava and calculate a daily as opposed to weekly total for each athlete. Doing this enables tracking on a daily, weekly, monthly or yearly period to set longer term challenges.

At 23:55 Strava is queried for the leaderboard data via an XMLHttpRequest in the same manner its own website does without any need to authenticate or sign up for their API. The response is JSON and the script is scheduled to run via cron using the following:

55 23 * * * python3 /home/pi/tour_de_dartford/tour_de_dartford.py

The JSON response is inserted an SQLite3 database. If the day is not a Monday the database is first queried for the running weekly total for each athlete and this is then subtracted to obtain a daily figure.

To provide a friendly summary of the data the script also creates and saves an HTML table which is committed to another repo which contains a statically hosted webpage. This webpage dynamically loads the table which is updated daily.

See tdd for the static webpage.

About

Code for Tour de Dartford training challenge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages