geo-activity-playground 0.25.0__py3-none-any.whl → 0.26.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- geo_activity_playground/core/tasks.py +1 -1
- geo_activity_playground/webui/static/bootstrap-dark-mode.js +78 -0
- geo_activity_playground/webui/strava/controller.py +2 -0
- geo_activity_playground/webui/strava/templates/strava/client-id.html.j2 +11 -1
- geo_activity_playground/webui/strava/templates/strava/connected.html.j2 +1 -1
- geo_activity_playground/webui/templates/page.html.j2 +42 -13
- geo_activity_playground/webui/templates/settings.html.j2 +11 -2
- geo_activity_playground/webui/upload/controller.py +1 -1
- {geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/METADATA +1 -1
- {geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/RECORD +13 -12
- {geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/LICENSE +0 -0
- {geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/WHEEL +0 -0
- {geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
/*!
|
2
|
+
* Color mode toggler for Bootstrap's docs (https://getbootstrap.com/)
|
3
|
+
* Copyright 2011-2024 The Bootstrap Authors
|
4
|
+
* Licensed under the Creative Commons Attribution 3.0 Unported License.
|
5
|
+
*/
|
6
|
+
|
7
|
+
(() => {
|
8
|
+
'use strict'
|
9
|
+
|
10
|
+
const getStoredTheme = () => localStorage.getItem('theme')
|
11
|
+
const setStoredTheme = theme => localStorage.setItem('theme', theme)
|
12
|
+
|
13
|
+
const getPreferredTheme = () => {
|
14
|
+
const storedTheme = getStoredTheme()
|
15
|
+
if (storedTheme) {
|
16
|
+
return storedTheme
|
17
|
+
}
|
18
|
+
|
19
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
|
20
|
+
}
|
21
|
+
|
22
|
+
const setTheme = theme => {
|
23
|
+
if (theme === 'auto') {
|
24
|
+
document.documentElement.setAttribute('data-bs-theme', (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'))
|
25
|
+
} else {
|
26
|
+
document.documentElement.setAttribute('data-bs-theme', theme)
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
setTheme(getPreferredTheme())
|
31
|
+
|
32
|
+
const showActiveTheme = (theme, focus = false) => {
|
33
|
+
const themeSwitcher = document.querySelector('#bd-theme')
|
34
|
+
|
35
|
+
if (!themeSwitcher) {
|
36
|
+
return
|
37
|
+
}
|
38
|
+
|
39
|
+
const themeSwitcherText = document.querySelector('#bd-theme-text')
|
40
|
+
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
|
41
|
+
|
42
|
+
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
|
43
|
+
element.classList.remove('active')
|
44
|
+
element.setAttribute('aria-pressed', 'false')
|
45
|
+
})
|
46
|
+
|
47
|
+
btnToActive.classList.add('active')
|
48
|
+
btnToActive.setAttribute('aria-pressed', 'true')
|
49
|
+
const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`
|
50
|
+
themeSwitcher.setAttribute('aria-label', themeSwitcherLabel)
|
51
|
+
|
52
|
+
if (focus) {
|
53
|
+
themeSwitcher.focus()
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
|
58
|
+
const storedTheme = getStoredTheme()
|
59
|
+
if (storedTheme !== 'light' && storedTheme !== 'dark') {
|
60
|
+
setTheme(getPreferredTheme())
|
61
|
+
}
|
62
|
+
})
|
63
|
+
|
64
|
+
window.addEventListener('DOMContentLoaded', () => {
|
65
|
+
showActiveTheme(getPreferredTheme())
|
66
|
+
|
67
|
+
document.querySelectorAll('[data-bs-theme-value]')
|
68
|
+
.forEach(toggle => {
|
69
|
+
toggle.addEventListener('click', () => {
|
70
|
+
const theme = toggle.getAttribute('data-bs-theme-value')
|
71
|
+
setStoredTheme(theme)
|
72
|
+
setTheme(theme)
|
73
|
+
showActiveTheme(theme, true)
|
74
|
+
})
|
75
|
+
})
|
76
|
+
})
|
77
|
+
})()
|
78
|
+
|
@@ -5,7 +5,17 @@
|
|
5
5
|
<h1 class="mb-3">Strava Connect</h1>
|
6
6
|
|
7
7
|
<div class="row mb-3">
|
8
|
-
<div class="col-md-
|
8
|
+
<div class="col-md-6">
|
9
|
+
<p>You can connect to Strava such that it automatically downloads your activities.</p>
|
10
|
+
|
11
|
+
<p>The Strava API has rather strict rate limiting. If you don't mind waiting a bit, you can just use the "client
|
12
|
+
ID" and "client secret" that are provided to use a pre-defined Strava app. In that case, just click on the
|
13
|
+
button. If you don't want to share the API limits with other people, go the <a
|
14
|
+
href="https://www.strava.com/settings/api">Strava API page</a> and create your own app. Then fill in
|
15
|
+
"client ID" and "client secret" in the form.</p>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="col-md-6">
|
9
19
|
<form action="/strava/post-client-id" method="POST">
|
10
20
|
<div class="mb-3">
|
11
21
|
<label for="client_id" class="form-label">Client ID</label>
|
@@ -33,6 +33,9 @@
|
|
33
33
|
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
|
34
34
|
|
35
35
|
|
36
|
+
<script src="/static/bootstrap-dark-mode.js"></script>
|
37
|
+
|
38
|
+
|
36
39
|
<!-- Favicon. -->
|
37
40
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
38
41
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
@@ -59,39 +62,65 @@
|
|
59
62
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
60
63
|
|
61
64
|
<li class="nav-item">
|
62
|
-
<a class="nav-link
|
63
|
-
href="{{ url_for('summary.index') }}">Summary</a>
|
65
|
+
<a class="nav-link" aria-current="page" href="{{ url_for('summary.index') }}">Summary</a>
|
64
66
|
</li>
|
65
67
|
<li class="nav-item">
|
66
|
-
<a class="nav-link
|
67
|
-
href="{{ url_for('calendar.index') }}">Calendar</a>
|
68
|
+
<a class="nav-link" aria-current="page" href="{{ url_for('calendar.index') }}">Calendar</a>
|
68
69
|
</li>
|
69
70
|
<li class="nav-item">
|
70
|
-
<a class="nav-link
|
71
|
+
<a class="nav-link" aria-current="page"
|
71
72
|
href="{{ url_for('explorer.map', zoom=14) }}">Explorer</a>
|
72
73
|
</li>
|
73
74
|
<li class="nav-item">
|
74
|
-
<a class="nav-link
|
75
|
+
<a class="nav-link" aria-current="page"
|
75
76
|
href="{{ url_for('explorer.map', zoom=17) }}">Squadratinhos</a>
|
76
77
|
</li>
|
77
78
|
<li class="nav-item">
|
78
|
-
<a class="nav-link
|
79
|
-
href="{{ url_for('heatmap.index') }}">Heatmap</a>
|
79
|
+
<a class="nav-link" aria-current="page" href="{{ url_for('heatmap.index') }}">Heatmap</a>
|
80
80
|
</li>
|
81
81
|
<li class="nav-item">
|
82
|
-
<a class="nav-link
|
82
|
+
<a class="nav-link" aria-current="page"
|
83
83
|
href="{{ url_for('eddington.index') }}">Eddington</a>
|
84
84
|
</li>
|
85
85
|
<li class="nav-item">
|
86
|
-
<a class="nav-link
|
86
|
+
<a class="nav-link" aria-current="page"
|
87
87
|
href="{{ url_for('equipment.index') }}">Equipment</a>
|
88
88
|
</li>
|
89
89
|
<li class="nav-item">
|
90
|
-
<a class="nav-link
|
91
|
-
href="{{ url_for('upload.index') }}">Upload</a>
|
90
|
+
<a class="nav-link" aria-current="page" href="{{ url_for('upload.index') }}">Upload</a>
|
92
91
|
</li>
|
93
92
|
<li class="nav-item">
|
94
|
-
<a class="nav-link
|
93
|
+
<a class="nav-link" aria-current="page" href="{{ url_for('settings') }}">Settings</a>
|
94
|
+
</li>
|
95
|
+
|
96
|
+
|
97
|
+
<li class="nav-item dropdown">
|
98
|
+
<button
|
99
|
+
class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle d-flex align-items-center"
|
100
|
+
id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown"
|
101
|
+
data-bs-display="static" aria-label="Toggle theme (dark)">
|
102
|
+
<span id="bd-theme-text">Theme</span>
|
103
|
+
</button>
|
104
|
+
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text">
|
105
|
+
<li>
|
106
|
+
<button type="button" class="dropdown-item d-flex align-items-center"
|
107
|
+
data-bs-theme-value="light" aria-pressed="false">
|
108
|
+
☀️ Light
|
109
|
+
</button>
|
110
|
+
</li>
|
111
|
+
<li>
|
112
|
+
<button type="button" class="dropdown-item d-flex align-items-center active"
|
113
|
+
data-bs-theme-value="dark" aria-pressed="true">
|
114
|
+
🌙 Dark
|
115
|
+
</button>
|
116
|
+
</li>
|
117
|
+
<li>
|
118
|
+
<button type="button" class="dropdown-item d-flex align-items-center"
|
119
|
+
data-bs-theme-value="auto" aria-pressed="false">
|
120
|
+
⚙️ Auto
|
121
|
+
</button>
|
122
|
+
</li>
|
123
|
+
</ul>
|
95
124
|
</li>
|
96
125
|
</ul>
|
97
126
|
</div>
|
@@ -8,8 +8,17 @@
|
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<div class="row mb-3">
|
11
|
-
<div class="
|
12
|
-
<
|
11
|
+
<div class="row row-cols-1 row-cols-md-3 g-2">
|
12
|
+
<div class="col">
|
13
|
+
<div class="card">
|
14
|
+
<div class="card-body">
|
15
|
+
<h5 class="card-title">Strava API</h5>
|
16
|
+
<p class="card-text">Connect to the Strava API to download activities from there.</p>
|
17
|
+
<a href="{{ url_for('strava.setup') }}" class="btn btn-primary">Set up Strava API</a>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
13
22
|
</div>
|
14
23
|
</div>
|
15
24
|
{% endblock %}
|
@@ -98,7 +98,7 @@ def scan_for_activities(
|
|
98
98
|
if pathlib.Path("Activities").exists():
|
99
99
|
import_from_directory(config.get("metadata_extraction_regexes", []))
|
100
100
|
if pathlib.Path("Strava Export").exists():
|
101
|
-
import_from_strava_checkout(
|
101
|
+
import_from_strava_checkout()
|
102
102
|
if (_strava_dynamic_config_path.exists() or "strava" in config) and not skip_strava:
|
103
103
|
import_from_strava_api()
|
104
104
|
|
{geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/RECORD
RENAMED
@@ -9,7 +9,7 @@ geo_activity_playground/core/heatmap.py,sha256=bRLQHzmTEsQbX8XWeg85x_lRGk272UoYR
|
|
9
9
|
geo_activity_playground/core/paths.py,sha256=ohJN_xNLh303uc0ATpL4iH01xANIE86pILRaQi4e-RQ,1893
|
10
10
|
geo_activity_playground/core/privacy_zones.py,sha256=4TumHsVUN1uW6RG3ArqTXDykPVipF98DCxVBe7YNdO8,512
|
11
11
|
geo_activity_playground/core/similarity.py,sha256=Jo8jRViuORCxdIGvyaflgsQhwu9S_jn10a450FRL18A,3159
|
12
|
-
geo_activity_playground/core/tasks.py,sha256=
|
12
|
+
geo_activity_playground/core/tasks.py,sha256=22rIidyRR0eDqz9T7swJJSl7I96OeZ-T6xFQkh1-RsQ,2521
|
13
13
|
geo_activity_playground/core/test_tiles.py,sha256=zce1FxNfsSpOQt66jMehdQRVoNdl-oiFydx6iVBHZXM,764
|
14
14
|
geo_activity_playground/core/test_time_conversion.py,sha256=Sh6nZA3uCTOdZTZa3yOijtR0m74QtZu2mcWXsDNnyQI,984
|
15
15
|
geo_activity_playground/core/tiles.py,sha256=VxPu9vdfKnxDxaYo5JSYmka9Dt3TDxg0zo3cYVJXVHc,3359
|
@@ -65,6 +65,7 @@ geo_activity_playground/webui/static/android-chrome-192x192.png,sha256=yxZgo8Jw4
|
|
65
65
|
geo_activity_playground/webui/static/android-chrome-384x384.png,sha256=bgeqAdyvDZBMch7rVi3qSawf0Zr4Go0EG8Ws_B8NApY,49297
|
66
66
|
geo_activity_playground/webui/static/android-chrome-512x512.png,sha256=Uiv62gQpUjMOdp9d6exzd6IyOi5zgQdgjIVVWYw5m98,38891
|
67
67
|
geo_activity_playground/webui/static/apple-touch-icon.png,sha256=NsVMubJtVzslhql4GZlwTWm4cNRowgcEOT53RuZV190,16549
|
68
|
+
geo_activity_playground/webui/static/bootstrap-dark-mode.js,sha256=XfyhxIFgjDc6aEj0kYgKpG5zjS5gvyhWCJmNfUG4HJY,2622
|
68
69
|
geo_activity_playground/webui/static/browserconfig.xml,sha256=u5EvU6U1jKSDiXHW0i4rXrs0lT_tmS82otbJnvmccrk,253
|
69
70
|
geo_activity_playground/webui/static/favicon-16x16.png,sha256=Yy8lRjGB7itDaeUI_l_Toq3OO0gzgPGnqIfM3CqcQy0,1419
|
70
71
|
geo_activity_playground/webui/static/favicon-32x32.png,sha256=K52R99pLGgWHnjFPPkVieBm051Er-sTCiMvgLr9Alrg,2587
|
@@ -74,26 +75,26 @@ geo_activity_playground/webui/static/safari-pinned-tab.svg,sha256=OzoEVGY0igWRXM
|
|
74
75
|
geo_activity_playground/webui/static/site.webmanifest,sha256=4vYxdPMpwTdB8EmOvHkkYcjZ8Yrci3pOwwY3o_VwACA,440
|
75
76
|
geo_activity_playground/webui/strava/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
76
77
|
geo_activity_playground/webui/strava/blueprint.py,sha256=Q2Wfxlg7bR2vjWZ3UpckPl9jWHwNB8hfP7SLBufgiUY,1055
|
77
|
-
geo_activity_playground/webui/strava/controller.py,sha256=
|
78
|
-
geo_activity_playground/webui/strava/templates/strava/client-id.html.j2,sha256=
|
79
|
-
geo_activity_playground/webui/strava/templates/strava/connected.html.j2,sha256=
|
78
|
+
geo_activity_playground/webui/strava/controller.py,sha256=Ye0R-nu5SwFdk2DAIEq7OE76XLgnRk9y8iJjLObbAUc,1437
|
79
|
+
geo_activity_playground/webui/strava/templates/strava/client-id.html.j2,sha256=m5gJk0VxcIn0VcROsOke5A5MbWXC5O1e1Lxc09MyN_g,1493
|
80
|
+
geo_activity_playground/webui/strava/templates/strava/connected.html.j2,sha256=TN6H8YPjG2zk8fodTaSaloTEJCXnpgTCIRX_uEVTiNI,274
|
80
81
|
geo_activity_playground/webui/summary/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
81
82
|
geo_activity_playground/webui/summary/blueprint.py,sha256=kzQ6MDOycQKfDcVoEUmL7HYHJA_gu8DlzVHwO37-_jA,514
|
82
83
|
geo_activity_playground/webui/summary/controller.py,sha256=i6A9-S9j9Hm67FcZPzJpqMgxRVsXbDmJiVLGiRtZIqk,8805
|
83
84
|
geo_activity_playground/webui/summary/templates/summary/index.html.j2,sha256=rsII1eMY-xNugh8A9SecnEcDZqkEOWYIfiHAGroQYuM,4442
|
84
85
|
geo_activity_playground/webui/templates/home.html.j2,sha256=fp48MjBuO4QJfQz6YPOWH56IzStgaclx9XbwEKmUFHQ,2403
|
85
|
-
geo_activity_playground/webui/templates/page.html.j2,sha256=
|
86
|
+
geo_activity_playground/webui/templates/page.html.j2,sha256=KwgUw7zOjWNVSZKM4BGWOaBbPhGZaaOXCvNV9pL-0R4,9160
|
86
87
|
geo_activity_playground/webui/templates/search.html.j2,sha256=FvNRoDfUlSzXjM_tqZY_fDhuhUDgbPaY73q56gdvF1A,1130
|
87
|
-
geo_activity_playground/webui/templates/settings.html.j2,sha256
|
88
|
+
geo_activity_playground/webui/templates/settings.html.j2,sha256=-q9GflrG2t6kSt-NerBN5NV1gRp12JT3KgGp_aPaKT8,674
|
88
89
|
geo_activity_playground/webui/tile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
90
|
geo_activity_playground/webui/tile/blueprint.py,sha256=cK0o2Z3BrLycgF9zw0F8s9qF-JaYDbF5Gog-GXDtUZ8,943
|
90
91
|
geo_activity_playground/webui/tile/controller.py,sha256=PISh4vKs27b-LxFfTARtr5RAwHFresA1Kw1MDcERSRU,1221
|
91
92
|
geo_activity_playground/webui/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
93
|
geo_activity_playground/webui/upload/blueprint.py,sha256=2l5q1LYtjgLF_3CAyPvCLx-wMebp14OJvgZBzGILdmQ,801
|
93
|
-
geo_activity_playground/webui/upload/controller.py,sha256=
|
94
|
+
geo_activity_playground/webui/upload/controller.py,sha256=BWcSlLy_fVAodDlnXkxE4eIotC_UHrjldACrToA-iAQ,3975
|
94
95
|
geo_activity_playground/webui/upload/templates/upload/index.html.j2,sha256=hfXkEXaz_MkM46rU56423D6V6WtK-EAXPszSY-_-Tx8,1471
|
95
|
-
geo_activity_playground-0.
|
96
|
-
geo_activity_playground-0.
|
97
|
-
geo_activity_playground-0.
|
98
|
-
geo_activity_playground-0.
|
99
|
-
geo_activity_playground-0.
|
96
|
+
geo_activity_playground-0.26.0.dist-info/LICENSE,sha256=4RpAwKO8bPkfXH2lnpeUW0eLkNWglyG4lbrLDU_MOwY,1070
|
97
|
+
geo_activity_playground-0.26.0.dist-info/METADATA,sha256=dFqZ5yCNUgsbZMxW55cZaI4Q_tbft6ifhGoaGgmImvc,1665
|
98
|
+
geo_activity_playground-0.26.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
99
|
+
geo_activity_playground-0.26.0.dist-info/entry_points.txt,sha256=pbNlLI6IIZIp7nPYCfAtiSiz2oxJSCl7DODD6SPkLKk,81
|
100
|
+
geo_activity_playground-0.26.0.dist-info/RECORD,,
|
{geo_activity_playground-0.25.0.dist-info → geo_activity_playground-0.26.0.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
File without changes
|