mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Added support for the TrainerDay workouts/find API (#4522)
* Added support for the TrainerDay workouts/find API * Added a new (optional) tab to the TrainerDay workouts download dialog * Deferring loading of the classic list of workouts until this tab is activated * Implemented the API for TrainerDays /workouts/find (see https://api.trainerday.com/api-explorer/) * Visualizing the workouts using a colored ErgFilePlot * Modified ErgFilePlot::setData to directly use the data of the given ErgFile instead of falling back to the ErgFile set in the context (required to display multiple plots at once) * Added a simplified version of the existing workouts query sytnax (supported verbs: duration, dominantzone) * Saving the workouts as trainerday-<hash>.erg * Using the segments-section as input for the hash and to identify duplicates * Functionality can be enabled in gcconfig.pri (GC_WANT_TRAINERDAY_API) * Prepared the travis-scripts before_script.sh to inject the API key to Secrets.h * Prepared appveyor.yml to inject the API key to Secrets.h * Patching GC_TRAINERDAY_API_PAGESIZE for appveyor * Configured api key for TrainerDay in appveyor
This commit is contained in:
committed by
GitHub
parent
0a8e0b6cc8
commit
ef716f8568
@@ -39,6 +39,8 @@ echo PYTHONINCLUDES = -I/usr/include/python3.7 >> src/gcconfig.pri
|
||||
echo PYTHONLIBS = -L/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu -lpython3.7m >> src/gcconfig.pri
|
||||
# GSL
|
||||
echo GSL_LIBS = -lgsl -lgslcblas -lm >> src/gcconfig.pri
|
||||
# TrainerDay Query API
|
||||
echo DEFINES += GC_WANT_TRAINERDAY_API >> src/gcconfig.pri
|
||||
|
||||
# Patch Secrets.h
|
||||
sed -i "s/__GC_GOOGLE_CALENDAR_CLIENT_SECRET__/"$GC_GOOGLE_CALENDAR_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
@@ -63,6 +65,7 @@ sed -i "s/__GC_NOLIO_CLIENT_ID__/"$GC_NOLIO_CLIENT_ID"/" src/Core/Secrets.h
|
||||
sed -i "s/__GC_NOLIO_SECRET__/"$GC_NOLIO_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "s/__GC_XERT_CLIENT_SECRET__/"$GC_XERT_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "s/__GC_AZUM_CLIENT_SECRET__/"$GC_AZUM_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "s/__GC_TRAINERDAY_API_KEY__/"$GC_TRAINERDAY_API_KEY"/" src/Core/Secrets.h
|
||||
cat src/gcconfig.pri
|
||||
# update translations
|
||||
lupdate src/src.pro
|
||||
|
||||
@@ -60,6 +60,8 @@ echo PYTHONINCLUDES = -ICore `python3.7-config --includes` >> src/gcconfig.pri
|
||||
echo PYTHONLIBS = `python3.7-config --ldflags` >> src/gcconfig.pri
|
||||
# GSL
|
||||
echo GSL_LIBS = -lgsl -lgslcblas -lm >> src/gcconfig.pri
|
||||
# TrainerDay Query API
|
||||
echo DEFINES += GC_WANT_TRAINERDAY_API >> src/gcconfig.pri
|
||||
# macOS version config
|
||||
echo "QMAKE_CXXFLAGS += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
echo "QMAKE_CFLAGS_RELEASE += -mmacosx-version-min=10.7 -arch x86_64" >> src/gcconfig.pri
|
||||
@@ -88,6 +90,7 @@ sed -i "" "s/__GC_NOLIO_SECRET__/"$GC_NOLIO_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_RWGPS_API_KEY__/"$GC_RWGPS_API_KEY"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_XERT_CLIENT_SECRET__/"$GC_XERT_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_AZUM_CLIENT_SECRET__/"$GC_AZUM_CLIENT_SECRET"/" src/Core/Secrets.h
|
||||
sed -i "" "s/__GC_TRAINERDAY_API_KEY__/"$GC_TRAINERDAY_API_KEY"/" src/Core/Secrets.h
|
||||
cat src/gcconfig.pri
|
||||
# update translations
|
||||
/usr/local/opt/qt5/bin/lupdate src/src.pro
|
||||
|
||||
Reference in New Issue
Block a user