Skip to content

Commit df059e4

Browse files
authored
doc: autocorrect it (yihong0618#793)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
1 parent 3878d9a commit df059e4

File tree

4 files changed

+39
-39
lines changed

4 files changed

+39
-39
lines changed

README-CN.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
139139
## 支持
140140

141141
- **[Strava](#strava)**
142-
- **[New Way To Sync Nike Run Club](#nike-run-club-new)**NFC同步的新方式
142+
- **[New Way To Sync Nike Run Club](#nike-run-club-new)**NFC 同步的新方式
143143
- **[Nike Run Club](#nike-run-club)**
144144
- **[Garmin](#garmin)**
145145
- **[Garmin-cn](#garmin-cn-大陆用户请用这个)**
@@ -157,7 +157,7 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
157157
- **[Nike+Strava(Using NRC Run, Strava backup data)](#nikestrava)**
158158
- **[Garmin_to_Strava(Using Garmin Run, Strava backup data)](#garmin_to_strava)**
159159
- **[Strava_to_Garmin(Using Strava Run, Garmin backup data)](#strava_to_garmin)**
160-
- **[Coros高驰](#Coros高驰)**
160+
- **[Coros 高驰](#Coros高驰)**
161161
## 视频教程
162162

163163
- https://www.youtube.com/watch?v=reLiY9p8EJk
@@ -250,11 +250,11 @@ const USE_DASH_LINE = true;
250250
// styling: 透明度:[0, 1]
251251
const LINE_OPACITY = 0.4;
252252
// update for now 2024/11/17 the privacy mode is true
253-
// styling: 开启隐私模式(不显示地图仅显示轨迹): 设置为 `true`
253+
// styling: 开启隐私模式 (不显示地图仅显示轨迹): 设置为 `true`
254254
// 注意:此配置仅影响页面显示,数据保护请参考下方的 "隐私保护"
255255
const PRIVACY_MODE = true;
256256
// update for now 2024/11/17 the lights on default is false
257-
// styling: 默认关灯: 设置为 `false`, 仅在隐私模式关闭时生效(`PRIVACY_MODE` = false)
257+
// styling: 默认关灯设置为 `false`, 仅在隐私模式关闭时生效 (`PRIVACY_MODE` = false)
258258
const LIGHTS_ON = false;
259259
```
260260

@@ -357,7 +357,7 @@ python3(python) run_page/keep_sync.py ${your mobile} ${your password} --with-gpx
357357
python3(python) run_page/keep_sync.py 13333xxxx example --with-gpx
358358
```
359359

360-
> 增加了 keep 对其他运动类型的支持,目前可选的有running, cycling, hiking,默认的运动数据类型为running
360+
> 增加了 keep 对其他运动类型的支持,目前可选的有 running, cycling, hiking,默认的运动数据类型为 running
361361
362362
```bash
363363
python3(python) run_page/keep_sync.py ${your mobile} ${your password} --with-gpx --sync-types running cycling hiking
@@ -441,7 +441,7 @@ python3(python) run_page/joyrun_sync.py 13333xxxx example --with-gpx
441441
python3(python) run_page/joyrun_sync.py 1393xx30xxxx 97e5fe4997d20f9b1007xxxxx --from-uid-sid --with-gpx
442442
```
443443

444-
> 支持配置min_grid_distance,默认为10
444+
> 支持配置 min_grid_distance,默认为 10
445445
446446
```bash
447447
python3(python) run_page/joyrun_sync.py 13333xxxx xxxx --athlete yihong0618 --min_grid_distance 5
@@ -657,16 +657,16 @@ python3(python) run_page/garmin_sync_cn_global.py ${garmin_cn_secret_string} ${g
657657

658658
<br>
659659

660-
> Please note:由于nike run club已经在中国大陆停止运营,所以只能通过 vpn 的方式进行登录。在开始之前先确认自己是全局的非中国大陆的代理,能够正确的访问`nike.com`而不是`nike.com.cn` 如下图所示.
660+
> Please note:由于 nike run club 已经在中国大陆停止运营,所以只能通过 vpn 的方式进行登录。在开始之前先确认自己是全局的非中国大陆的代理,能够正确的访问`nike.com`而不是`nike.com.cn` 如下图所示
661661
662662
![nike.com](https://github.com/user-attachments/assets/8ce6ae8f-4bc6-4522-85ec-3e5b7590e96d)
663663
<br>
664664

665665
1. 登录/注册 [NikeRunClub](https://www.nike.com/) 账号
666666
![login](https://github.com/user-attachments/assets/659341fb-4abf-491e-bda7-bfca968921b3)
667-
2. 登录成功后,键盘打开F12->Application->localstorage-> 复制键为`https://www.nike.com`的值中的`access_token`的内容.
667+
2. 登录成功后,键盘打开 F12->Application->localstorage-> 复制键为`https://www.nike.com`的值中的`access_token`的内容
668668
![developer_mode](https://github.com/user-attachments/assets/c932318d-a123-4505-8fd8-b46946c25d29)
669-
3. 在根目录执行,你应该就可以看到下图中的内容,然后你就可以正常在你的手机版NRC里登录你的账号了:
669+
3. 在根目录执行你应该就可以看到下图中的内容,然后你就可以正常在你的手机版 NRC 里登录你的账号了:
670670

671671
```bash
672672
python3(python) run_page/nike_sync.py ${access_token}
@@ -679,7 +679,7 @@ python3(python) run_page/nike_sync.py ${access_token} --continue-sync
679679

680680
![tg_image_166091873](https://github.com/user-attachments/assets/9d4851d6-849a-4bb7-8ffe-5358fa7328b2)
681681

682-
如果你想自动化同步NRC中的运动数据,[issue692](https://github.com/yihong0618/running_page/issues/692#issuecomment-2218849713)中查看相关内容.
682+
如果你想自动化同步 NRC 中的运动数据,[issue692](https://github.com/yihong0618/running_page/issues/692#issuecomment-2218849713)中查看相关内容
683683

684684
</details>
685685

@@ -700,9 +700,9 @@ python3(python) run_page/nike_sync.py ${access_token} --continue-sync
700700

701701
1. 在这里登陆[website](https://unite.nike.com/s3/unite/mobile.html?androidSDKVersion=3.1.0&corsoverride=https%3A%2F%2Funite.nike.com&uxid=com.nike.sport.running.droid.3.8&backendEnvironment=identity&view=login&clientId=VhAeafEGJ6G8e9DxRUz8iE50CZ9MiJMG), 打开 F12 在浏览器抓 login -> XHR -> get the `refresh_token` from login api
702702

703-
2. 复制 `refresh_token` 之后可以添加在GitHub Secrets 中,也可以直接在命令行中使用
703+
2. 复制 `refresh_token` 之后可以添加在 GitHub Secrets 中,也可以直接在命令行中使用
704704

705-
> Chrome 浏览器:按下 F12 打开浏览器开发者工具,点击 Application 选项卡,来到左侧的 Storage 面板,点击展开 Local storage,点击下方的 https://unite.nike.com。接着点击右侧的 com.nike.commerce.nikedotcom.web.credential Key,下方会分行显示我们选中的对象,可以看到 refresh_token ,复制 refresh_token 右侧的值。Safari 浏览器:在 Safari 打开 Nike 的网页后,右击页面,选择「检查元素」,打开浏览器开发者工具。点击「来源」选项卡,在左侧找到 XHR 文件夹,点击展开,在下方找到 login 文件并单击,在右侧同样可以看到 refresh_token ,复制 refresh_token 右侧的值。
705+
> Chrome 浏览器:按下 F12 打开浏览器开发者工具,点击 Application 选项卡,来到左侧的 Storage 面板,点击展开 Local storage,点击下方的 https://unite.nike.com。接着点击右侧的 com.nike.commerce.nikedotcom.web.credential Key,下方会分行显示我们选中的对象,可以看到 refresh_token,复制 refresh_token 右侧的值。Safari 浏览器:在 Safari 打开 Nike 的网页后,右击页面,选择「检查元素」,打开浏览器开发者工具。点击「来源」选项卡,在左侧找到 XHR 文件夹,点击展开,在下方找到 login 文件并单击,在右侧同样可以看到 refresh_token,复制 refresh_token 右侧的值。
706706
707707
```bash
708708
python3(python) run_page/nike_sync.py ${nike refresh_token}
@@ -961,10 +961,10 @@ python3(python) run_page/strava_to_garmin_sync.py ${{ secrets.STRAVA_CLIENT_ID }
961961
962962
</details>
963963

964-
### Coros高驰
964+
### Coros 高驰
965965

966966
<details>
967-
<summary>获取您的 Coros高驰 数据</summary>
967+
<summary>获取您的 Coros 高驰 数据</summary>
968968

969969
#### 在终端中输入以下命令
970970

@@ -974,33 +974,33 @@ python run_page/coros_sync.py ${{ secrets.COROS_ACCOUNT }} ${{ secrets.COROS_PAS
974974

975975
#### 修改 `run_data_sync.yml``env.RUN_TYPE: coros`
976976

977-
#### 设置 github action中Coros高驰信息
977+
#### 设置 github action 中 Coros 高驰信息
978978

979-
- 在github action中配置`COROS_ACCOUNT`,`COROS_PASSWORD`参数
979+
- 在 github action 中配置 `COROS_ACCOUNT`,`COROS_PASSWORD` 参数
980980

981981
![github-action](https://img3.uploadhouse.com/fileuploads/30980/3098042335f8995623f8b50776c4fad4cf7fff8d.png)
982982

983983
</details>
984984

985985
### Keep_to_Strava
986986
<details>
987-
<summary>获取您的Keep数据,然后同步到Strava</summary>
987+
<summary>获取您的 Keep 数据,然后同步到 Strava</summary>
988988

989-
示例:
989+
示例
990990
```bash
991991
python3(python) run_page/keep_to_strava_sync.py ${your mobile} ${your password} ${client_id} ${client_secret} ${strava_refresh_token} --sync-types running cycling hiking
992992
```
993993

994994
#### 解决的需求:
995-
1. 适用于由Strava总览/展示数据,但是有多种运动类型,且数据来自不同设备的用户。
996-
2. 适用于期望将华为运动健康/OPPO健康等数据同步到Strava的用户(前提是手机APP端已经开启了和Keep之间的数据同步)。
997-
3. 理论上华为/OPPO等可以通过APP同步到Keep的设备,均可通过此方法自动同步到Strava,目前已通过测试的APP有
998-
- 华为运动健康: 户外跑步,户外骑行,户外步行。
995+
1. 适用于由 Strava 总览/展示数据,但是有多种运动类型,且数据来自不同设备的用户。
996+
2. 适用于期望将华为运动健康/OPPO 健康等数据同步到 Strava 的用户 (前提是手机 APP 端已经开启了和 Keep 之间的数据同步)。
997+
3. 理论上华为/OPPO 等可以通过 APP 同步到 Keep 的设备,均可通过此方法自动同步到 Strava,目前已通过测试的 APP 有
998+
- 华为运动健康户外跑步,户外骑行,户外步行。
999999

1000-
#### 特性以及使用细节:
1001-
1. 与Keep相似,但是由keep_to_strava_sync.py实现,不侵入data.db 与 activities.json。因此不会出现由于同时使用keep_sync和strava_sync而导致的数据重复统计/展示问题。
1002-
2. 上传至Strava时,会自动识别为Strava中相应的运动类型, 目前支持的运动类型为running, cycling, hiking。
1003-
3. run_data_sync.yml中的修改
1000+
#### 特性以及使用细节
1001+
1. 与 Keep 相似,但是由 keep_to_strava_sync.py 实现,不侵入 data.db 与 activities.json。因此不会出现由于同时使用 keep_sync 和 strava_sync 而导致的数据重复统计/展示问题。
1002+
2. 上传至 Strava 时,会自动识别为 Strava 中相应的运动类型,目前支持的运动类型为 running, cycling, hiking。
1003+
3. run_data_sync.yml 中的修改
10041004

10051005
```yaml
10061006
RUN_TYPE: keep_to_strava_sync
@@ -1104,7 +1104,7 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime
11041104

11051105
- 修改你的 fork 的 running_page 仓库改名为 xxx.github.io, xxx 是你 github 的 username
11061106
- 修改 gh-pages.yml 中的 Build 模块,删除 `${{ github.event.repository.name }}` 改为`run: PATH_PREFIX=/ pnpm build` 即可
1107-
- 修改 src/static/site-metadata.ts 中 `siteUrl: ''` 或是添加你的自定义域名,`siteUrl: '[your_own_domain]'` 即可
1107+
- 修改 src/static/site-metadata.ts 中 `siteUrl: ''` 或是添加你的自定义域名,`siteUrl: '[your_own_domain]'`,即可
11081108

11091109
</details>
11101110

run_page/oppo_sync.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
"sportMode": 10,//运动模式 室内跑 详情见文档附录
4545
"otherSportData": {
4646
"avgHeartRate": 153,//平均心率 单位:count/min
47-
"avgPace": 585,//平均配速 单位s/km
48-
"avgStepRate": 115,//平均步频 单位step/min
49-
"bestStepRate": 135,//最佳步频 单位step/min
50-
"bestPace": 572,//最佳配速 单位s/km
47+
"avgPace": 585,//平均配速 单位 s/km
48+
"avgStepRate": 115,//平均步频 单位 step/min
49+
"bestStepRate": 135,//最佳步频 单位 step/min
50+
"bestPace": 572,//最佳配速 单位 s/km
5151
"totalCalories": 2176000,//总消耗 单位卡
5252
"totalDistance": 23175,//总距离 单位米
5353
"totalSteps": 26062,//总步数
54-
"totalTime": 13562000,//总时长,单位:毫秒
54+
"totalTime": 13562000,//总时长,单位毫秒
5555
"totalClimb": 100//累计爬升高度,单位:米
5656
},
5757
},
@@ -64,7 +64,7 @@
6464
"avgHeartRate": 90,//平均心率 单位:count/min
6565
"courseName": "零基础减脂碎片练习",//课程名称
6666
"finishNumber": 1,//课程完成次数
67-
"trainedCalorie": 13554,//训练消耗的卡路里,单位:
67+
"trainedCalorie": 13554,//训练消耗的卡路里,单位
6868
"trainedDuration": 176000//实际训练时间,单位:ms
6969
},
7070
}

run_page/save_to_parqent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212
examples:
1313
14-
duckdb.sql("select regexp_extract(location_country, '[\u4e00-\u9fa5]{2,}(市|自治州|特别行政区)') as run_location, concat(try_cast(sum(distance/1000) as integer)::varchar,' km') as run_distance from read_parquet('https://github.com/yihong0618/run/raw/refs/heads/master/run_page/data.parquet') where run_location is not NULL group by run_location order by sum(distance) desc;").show(max_rows=50)
14+
duckdb.sql("select regexp_extract(location_country, '[\u4e00-\u9fa5]{2,}(市 | 自治州 | 特别行政区)') as run_location, concat(try_cast(sum(distance/1000) as integer)::varchar,' km') as run_distance from read_parquet('https://github.com/yihong0618/run/raw/refs/heads/master/run_page/data.parquet') where run_location is not NULL group by run_location order by sum(distance) desc;").show(max_rows=50)
1515
1616
┌──────────────┬──────────────┐
1717
│ run_location │ run_distance │

run_page/tulipsport_sync.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def merge_summary_and_detail_to_nametuple(summary, detail):
108108
location_country = ""
109109

110110
# 详情接口具体的内容参考文档链接:https://open.tulipsport.com/document
111-
# map_data_list的结构为[ [latitude, longitude, elevation, section, distance, hr, time, cadence], ... ]
111+
# map_data_list 的结构为 [ [latitude, longitude, elevation, section, distance, hr, time, cadence], ... ]
112112
point_list = detail["map_data_list"]
113113
point_list_length = len(point_list)
114114
if point_list_length and summary["outdoor"]:
@@ -149,7 +149,7 @@ def find_last_tulipsport_start_time(track_ids):
149149
]
150150
if tulipsport_ids:
151151
tulipsport_ids.sort()
152-
# 从模拟的构造ID(特殊前缀(666) + 活动开始时间的timestamp + 活动距离(单位:米,支持单次活动最大距离为999,999米))中读取时间信息
152+
# 从模拟的构造 ID(特殊前缀 (666) + 活动开始时间的 timestamp + 活动距离 (单位:米,支持单次活动最大距离为 999,999 米))中读取时间信息
153153
start_time = datetime.fromtimestamp(
154154
int(str(tulipsport_ids[-1])[3:-6]), DEFAULT_TIMEZONE
155155
)
@@ -199,7 +199,7 @@ def save_activity_gpx(summary, detail, track):
199199
gpx.tracks.append(gpx_track)
200200

201201
# 详情接口具体的内容参考文档链接:https://open.tulipsport.com/document
202-
# map_data_list的结构为[ [latitude, longitude, elevation, section, distance, hr, time, cadence], ... ]
202+
# map_data_list 的结构为 [ [latitude, longitude, elevation, section, distance, hr, time, cadence], ... ]
203203
point_list = detail["map_data_list"]
204204
last_section = ""
205205
avg_hr = int(detail["avg_hr"]) if detail.__contains__("avg_hr") else 0
@@ -244,8 +244,8 @@ def save_activity_gpx(summary, detail, track):
244244
pass
245245

246246

247-
# 郁金香运动的活动ID采用UUID模式,而DB主键使用long类型,无法有效存储,所以采用构造个人唯一的活动ID
248-
# 模拟构造ID = 特殊前缀 + 活动开始时间的timestamp + 活动距离(单位:米)
247+
# 郁金香运动的活动 ID 采用 UUID 模式,而 DB 主键使用 long 类型,无法有效存储,所以采用构造个人唯一的活动 ID
248+
# 模拟构造 ID = 特殊前缀 + 活动开始时间的 timestamp + 活动距离(单位:米)
249249
def build_tulipsport_int_activity_id(activity):
250250
timestamp_str = str(
251251
int(datetime.fromisoformat(activity["start_date_local"] + "+08:00").timestamp())

0 commit comments

Comments
 (0)