Skip to content

Commit

Permalink
Add support for Google Drive storage
Browse files Browse the repository at this point in the history
  • Loading branch information
mduggan committed Dec 29, 2021
1 parent b4ccb90 commit d509992
Show file tree
Hide file tree
Showing 9 changed files with 351 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ redis==2.10.6
django-ipware
smashrun-client>=0.6.0
beautifulsoup4
google-api-python-client
oauth2client
3 changes: 3 additions & 0 deletions tapiriik/local_settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ SMASHRUN_CLIENT_SECRET = "####"
SPORTTRACKS_CLIENT_ID = "####"
SPORTTRACKS_CLIENT_SECRET = "####"

GOOGLEDRIVE_CLIENT_ID = "####"
GOOGLEDRIVE_CLIENT_SECRET = "####"

STRAVA_CLIENT_SECRET = "####"
STRAVA_CLIENT_ID = "####"
STRAVA_RATE_LIMITS = []
Expand Down
1 change: 1 addition & 0 deletions tapiriik/services/GoogleDrive/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .googledrive import *
340 changes: 340 additions & 0 deletions tapiriik/services/GoogleDrive/googledrive.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tapiriik/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
Endomondo = EndomondoService()
from tapiriik.services.Dropbox import DropboxService
Dropbox = DropboxService()
from tapiriik.services.GoogleDrive import GoogleDriveService
GoogleDrive = GoogleDriveService()
from tapiriik.services.GarminConnect import GarminConnectService
GarminConnect = GarminConnectService()
from tapiriik.services.SportTracks import SportTracksService
Expand Down
2 changes: 2 additions & 0 deletions tapiriik/services/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def List():
Endomondo,
SportTracks,
Dropbox,
GoogleDrive,
TrainingPeaks,
RideWithGPS,
TrainAsONE,
Expand Down Expand Up @@ -62,6 +63,7 @@ def PreferredDownloadPriorityList():
SportTracks, # Pretty much equivalent to GC, no temperature (not that GC temperature works all thar well now, but I digress)
TrainingPeaks, # No seperate run cadence, but has temperature
Dropbox, # Equivalent to any of the above
GoogleDrive,
RideWithGPS, # Uses TCX for everything, so same as Dropbox
TrainAsONE,
VeloHero, # PWX export, no temperature
Expand Down
Binary file added tapiriik/web/static/img/services/googledrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tapiriik/web/views/privacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def privacy(request):
services["strava"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
services["sporttracks"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
services["dropbox"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
services["googledrive"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":CACHED})
services["runkeeper"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
services["rwgps"].update({"email": OPTIN, "password": OPTIN, "tokens": NO, "metadata": YES, "data":NO})
services["trainingpeaks"].update({"email": NO, "password": NO, "tokens": YES, "metadata": YES, "data":NO})
Expand Down

0 comments on commit d509992

Please sign in to comment.