-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaintenance.py
executable file
·45 lines (29 loc) · 987 Bytes
/
maintenance.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
import os
import sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from stravaauth import get_tokens, get_account, site_login
from get_activities import get_activities
from fix import name_fix, elevation_fix
from give_kudos import KudosGiver
from selenium import webdriver
if __name__ == '__main__':
###############################
# Get Auth Tokens from File
# Refresh if needed
tokens = get_tokens()
###############################
# Get Activities from JSON file
activities = get_activities(tokens)
###############################
# Activity Name Fix
name_fix(activities,tokens)
###############################
# Give Kudos
#kg = KudosGiver()
#kg.login_and_kudos()
###############################
# Fix the Elevations - Chicago is Flat, so we look for a pretty low threshold
#driver = webdriver.Firefox()
#elevation_fix(driver,activities)
#driver.quit()