Github_yihong0618_running_page 部署配置

发布时间 2023-12-21 15:04:22作者: 隔岸观雨

项目来源:https://github.com/yihong0618/run

依赖:python-3.11.7 node git(python 太低、太高的版本可能会导致某些模块安装不上)

  git clone https://github.com/yihong0618/running_page.git --depth=1
  • 注意:需要使用管理员的 CMD (git bash)来执行以下代码(最好是使用上网来执行下面代码)
  pip3 install -r requirements.txt 
  npm install -g corepack && corepack enable && pnpm install
  pnpm develop

配置佳明数据

获取佳明CN的密钥

  python3(python) run_page/get_garmin_secret.py ${your email} ${your password} --is-cn

执行佳明国区同步脚本

  python3(python) run_page/garmin_sync.py xxxxxxxxx(密钥) --is-cn

在本地部署数据、服务

我做了一个脚本,以下是代码:
文件名:Running_Page.bat

  python run_page/garmin_sync.py xxxxxxxxx(密钥) --is-cn
  python run_page/gen_svg.py --from-db --title "Will running" --type github --athlete "Will" --special-distance 10 --special-distance2 20 --special-color yellow --special-color2 red --output assets/github.svg --use-localtime --min-distance 0.5 
  python run_page/gen_svg.py --from-db --title "Will running" --type grid --athlete "Will"  --output assets/grid.svg --min-distance 2.0 --special-color yellow --special-color2 red --special-distance 20 --special-distance2 40 --use-localtime
  python run_page/gen_svg.py --from-db --type circular --use-localtime
  pnpm develop