From 93c36f8386dfa444d931202077dc5415a8a352df Mon Sep 17 00:00:00 2001 From: ben_29 Date: Mon, 19 Aug 2024 18:54:41 +0800 Subject: [PATCH] doc: update notice --- .github/workflows/run_data_sync.yml | 7 ++++++- README-CN.md | 19 ++++++++++++++----- README.md | 22 +++++++++++++++------- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run_data_sync.yml b/.github/workflows/run_data_sync.yml index 065a175262f..05fb75a046c 100644 --- a/.github/workflows/run_data_sync.yml +++ b/.github/workflows/run_data_sync.yml @@ -25,7 +25,7 @@ on: env: # please change to your own config. - RUN_TYPE: pass # support strava/nike/garmin/coros/garmin_cn/garmin_sync_cn_global/keep/only_gpx/only_fit/nike_to_strava/strava_to_garmin/tcx_to_garmin/strava_to_garmin_cn/garmin_to_strava/garmin_to_strava_cn/codoon/oppo, Please change the 'pass' it to your own + RUN_TYPE: pass # support strava/nike/garmin/coros/garmin_cn/garmin_sync_cn_global/keep/only_gpx/only_fit/nike_to_strava/strava_to_garmin/tcx_to_garmin/strava_to_garmin_cn/garmin_to_strava/garmin_to_strava_cn/codoon/oppo/db_updater, Please change the 'pass' it to your own ATHLETE: yihong0618 TITLE: Yihong0618 Running MIN_GRID_DISTANCE: 10 # change min distance here @@ -202,6 +202,11 @@ jobs: # If you want to sync fit activity in gpx format, please consider the following script: # python run_page/oppo_sync.py ${{ secrets.OPPO_ID }} ${{ secrets.OPPO_CLIENT_SECRET }} ${{ secrets.OPPO_CLIENT_REFRESH_TOKEN }} --with-gpx + - name: Run db updater script to add "Elevation Gain" field to db + if: env.RUN_TYPE == 'db_updater' + run: | + python run_page/db_updater.py + - name: Make svg GitHub profile if: env.RUN_TYPE != 'pass' run: | diff --git a/README-CN.md b/README-CN.md index b07320a61fe..1c0406f99b2 100644 --- a/README-CN.md +++ b/README-CN.md @@ -4,12 +4,21 @@ 2. python3(python) in README means python3 python 3. use v2.0 need change vercel setting from gatsby to vite 4. 2023.09.26 garmin need secret_string(and in Actions) get + + ```bash + python run_page/get_garmin_secret.py ${email} ${password} + # if cn + python run_page/get_garmin_secret.py ${email} ${password} --is-cn + ``` -```bash - python run_page/get_garmin_secret.py ${email} ${password} - # if cn - python run_page/get_garmin_secret.py ${email} ${password} --is-cn -``` +5. 2024.08.19: Added `Elevation Gain` field, If you forked the project before this update, please run the following command: + - To resolve errors: `sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: activities.elevation_gain` + - For old data: To include `Elevation Gain` for past activities, perform a full reimport. + - If you don't have a local environment, set `RUN_TYPE` to `db_updater` in the `.github/workflows/run_data_sync.yml` file once then change back. + + ```bash + python run_page/db_updater.py + ``` ![running_page](https://socialify.git.ci/yihong0618/running_page/image?description=1&font=Inter&forks=1&issues=1&language=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2Fshaonianche%2Fgallery%2Fmaster%2Frunning_page%2Frunning_page_logo_150*150.jpg&owner=1&pulls=1&stargazers=1&theme=Light) diff --git a/README.md b/README.md index 26ef5b37ed0..30cc19d9e13 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,21 @@ 1. clone or Fork before vercel 404 need to pull the latest code 2. python3(python) in README means python3 python 3. use v2.0 need change vercel setting from gatsby to vite -4. 2023.09.26 garmin need secret_string(and in Actions) get - -```bash - python run_page/get_garmin_secret.py ${email} ${password} - # if cn - python run_page/get_garmin_secret.py ${email} ${password} --is-cn -``` +4. 2023.09.26 garmin need secret_string(and in Actions) get + ```bash + python run_page/get_garmin_secret.py ${email} ${password} + # if cn + python run_page/get_garmin_secret.py ${email} ${password} --is-cn + ``` + +5. 2024.08.19: Added `Elevation Gain` field, If you forked the project before this update, please run the following command: + - To resolve errors: `sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: activities.elevation_gain` + - For old data: To include `Elevation Gain` for past activities, perform a full reimport. + - If you don't have a local environment, set `RUN_TYPE` to `db_updater` in the `.github/workflows/run_data_sync.yml` file once then change back. + + ```bash + python run_page/db_updater.py + ```