Skip to content

Commit

Permalink
docs:update
Browse files Browse the repository at this point in the history
  • Loading branch information
shaonianche committed Oct 23, 2023
1 parent 585233d commit b5642e6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
27 changes: 23 additions & 4 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
4. Mapbox 进行地图展示
5. Nike 及 Runtastic(Adidas Run) 以及佳明(佳明中国)及 Keep 等,自动备份 gpx 数据,方便备份及上传到其它软件

> 因为数据存在 gpx 和 data.db 中,理论上支持几个软件一起,你可以把之前各类 app 的数据都同步到这里(建议本地同步,之后 actions 选择正在用的 app
> 因为数据存在 gpx 和 data.db 中,理论上支持几个软件一起,你可以把之前各类 App 的数据都同步到这里(建议本地同步,之后 Actions 选择正在用的 App

> 如果你不想公开数据,可以选择 strava 的模糊处理,或 private 仓库。
> 如果你不想公开数据,可以选择 `strava` 的模糊处理,或 `private` 仓库。

<details>
<summary>缩放地图彩蛋</summary>

<br>

![image](https://user-images.githubusercontent.com/15976103/95644909-a31bcd80-0aec-11eb-9270-869b0a94f59f.png)

</details>
Expand All @@ -126,8 +128,8 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
- **[Garmin](#garmin)**
- **[Garmin-cn](#garmin-cn-大陆用户请用这个)**
- **[Keep](#keep)**
- **[悦跑圈](#joyrun 悦跑圈,因悦跑圈限制单个设备,无法自动化)**
- **[咕咚](#codoon 咕咚,因咕咚限制单个设备,无法自动化)**
- **[悦跑圈](#joyrun悦跑圈)** :限制单个设备,无法自动化
- **[咕咚](#codoon咕咚)** :限制单个设备,无法自动化
- **[郁金香运动](#tulipsport)**
- **[GPX](#gpx)**
- **[TCX](#tcx)**
Expand Down Expand Up @@ -350,6 +352,8 @@ TRANS_GCJ02_TO_WGS84 = True

### JoyRun(悦跑圈)

> 因悦跑圈限制单个设备,无法自动化。

<details>
<summary>获取您的悦跑圈数据</summary>

Expand Down Expand Up @@ -400,6 +404,8 @@ python3(python) run_page/joyrun_sync.py 1393xx30xxxx 97e5fe4997d20f9b1007xxxxx -

### Codoon(咕咚)

> 因悦跑圈限制单个设备,无法自动化。

<details>
<summary>获取您的咕咚数据</summary>

Expand Down Expand Up @@ -812,6 +818,8 @@ python3(python) run_page/strava_to_garmin_sync.py ${{ secrets.STRAVA_CLIENT_ID }
<details>
<summary>生成数据展示</summary>

<br>

- 生成数据展示 SVG
- 展示效果:[点击查看](https://raw.githubusercontent.com/yihong0618/running_page/master/assets/github.svg)、[点击查看](https://raw.githubusercontent.com/yihong0618/running_page/28fa801e4e30f30af5ae3dc906bf085daa137936/assets/grid.svg)

Expand Down Expand Up @@ -841,6 +849,8 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime
<details>
<summary>使用 Vercel 部署</summary>

<br>

1. vercel 连接你的 GitHub repo

![image](https://user-images.githubusercontent.com/15976103/94452465-2599b880-01e2-11eb-9538-582f0f46c421.png)
Expand All @@ -856,6 +866,7 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime

<details>
<summary> 使用 Cloudflare 部署 </summary>

<br>

1. 登录到 [Cloudflare 仪表板](https://dash.cloudflare.com)。
Expand All @@ -877,6 +888,8 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime
<details>
<summary> 部署到 GitHub Pages </summary>

<br>

1. 进入仓库的 "Settings -> GitHub Pages -> Source",选择 "GitHub Actions"

2. 进入仓库的 "Actions -> Workflows -> All Workflows",选择左侧面板的 "Run Data Sync",然后点击 "Run workflow"
Expand All @@ -899,6 +912,8 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime
<details>
<summary>修改 GitHub Actions Token</summary>

<br>

Actions [源码](https://github.com/yihong0618/running_page/blob/master/.github/workflows/run_data_sync.yml)
需要做如下步骤

Expand All @@ -919,6 +934,8 @@ Actions [源码](https://github.com/yihong0618/running_page/blob/master/.github/

<summary>使用 iOS 的 Shortcuts 实现自动化</summary>

<br>

下面拿 keep app 举例,当结束跑步后关闭 app,然后自动触发 Actions 更新数据。

1. 拿到项目的 actions id(需要自行申请 token)
Expand Down Expand Up @@ -953,6 +970,8 @@ curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "
<details>
<summary>把数据文件放在 GitHub Cache 中</summary>

<br>

`run_data_sync.yml` 中的 `SAVE_DATA_IN_GITHUB_CACHE` 设置为 `true` 时,可以把脚本抓取和中间产生的数据文件放到 GitHub Actions Cache 中。这样可以让你的 GitHub commit 历史和目录保持干净。

如果你用 `GitHub Pages` 部署建议把这个值设置成 `true`
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ python3(python) run_page/tcx_sync.py
<details>
<summary>Make your <code>FIT</code> data</summary>
X<br>
<br>
Copy all your tcx files to FIT_OUT or new fit files
Expand Down Expand Up @@ -576,7 +576,7 @@ python3(python) run_page/nike_to_strava_sync.py eyJhbGciThiMTItNGIw****** xxx x
<br>
1. finish garmin and strava setps
1. finish garmin and strava setup
2. Execute in the root directory:
```bash
Expand All @@ -598,7 +598,7 @@ python3(python) run_page/garmin_to_strava_sync.py xxx xxx xxx xx
<br>
1. finish garmin and strava setps, at the same time, you need to add additional strava config in Github Actions secret: `secrets.STRAVA_EMAIL`,`secrets.STRAVA_PASSWORD`
1. finish garmin and strava setup, at the same time, you need to add additional strava config in Github Actions secret: `secrets.STRAVA_EMAIL`,`secrets.STRAVA_PASSWORD`
2. Execute in the root directory:
```bash
Expand Down Expand Up @@ -657,6 +657,7 @@ For more display effects, see:
<details>
<summary> Use <code> Vercel </code> to deploy </summary>
<br>
1. vercel connects to your GitHub repo.
Expand All @@ -678,6 +679,7 @@ For more display effects, see:
<details>
<summary> Use <code> Cloudflare </code> to deploy </summary>
<br>
1. Login to [Cloudflare dashboard](https://dash.cloudflare.com).
Expand All @@ -699,6 +701,8 @@ For more display effects, see:
<details>
<summary> Deploy to GitHub Pages </summary>
<br>
1. Go to repository's `Settings -> GitHub Pages -> Source`, choose `GitHub Actions`
2. Go to the repository's `Actions -> Workflows -> All Workflows`, choose `Run Data Sync` from the left panel, and click `Run workflow`.
Expand All @@ -719,6 +723,7 @@ For more display effects, see:
<details>
<summary> Modifying information in <code> GitHub Actions </code> </summary>
<br>
Actions [source code](https://github.com/yihong0618/running_page/blob/master/.github/workflows/run_data_sync.yml)
Expand Down Expand Up @@ -752,11 +757,13 @@ The following steps need to be taken
<summary>Automate with <code> iOS Shortcuts </code> </summary>
<br>
Take the keep app as an example. Close the app after running, and then automatically trigger Actions to update the data.
1. Get actions idneed to apply token
1. Get actions id (need to apply token)
```shell
```bash
curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "Authorization: token d8xxxxxxxxxx" # change to your config
```
Expand Down Expand Up @@ -785,7 +792,9 @@ curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "
<details>
<summary>Storing Data Files in GitHub Cache</summary>
When `SAVE_DATA_IN_GITHUB_CACHE` is set to `true` in the `run_data_sync.yml` file, the script can store fetched and intermediate data files in the GitHub Action cache. This helps keep your GitHub commit history and directory clean.
<br>
When `SAVE_DATA_IN_GITHUB_CACHE` is set to `true` in the `run_data_sync.yml` file, the script can store fetched and intermediate data files in the GitHub Action Cache. This helps keep your GitHub commit history and directory clean.
If you are deploying using GitHub Pages, it is recommended to set this value to `true`, and set `BUILD_GH_PAGES` to true.
Expand Down

0 comments on commit b5642e6

Please sign in to comment.