note2: 2023.09.26 garmin need secret_string(and in Actions) get python run_page/garmin_sync.py ${secret_string} if cn python run_page/garmin_sync.py ${secret_string} --is-cn
简体中文 | English
This project is based on running_page and adds support for multi sports types. Follow the steps in the origin repo to deploy.
- support multi sports types, like Ride/Hike/Swim/Rowing
- support new apps
- Codoon(咕咚) (Couldn't automate for its limitation from the server side)
- Xingzhe(行者)
- support RoadTrip(GoogleMaps), show Road Trip on maps
This fork can use the Ninebot Trips Notion database as the source of
src/static/activities.json. It reads each row's GPX file property, unwraps
the *_wgs84.gpx.json payload, and renders the trip as a Ninebot route type.
Ninebot keeps its own color and label in the UI while being counted with ride
routes in ride-oriented calendar/map statistics.
Required env vars:
export NOTION_TOKEN=...
export NOTION_DATABASE_ID=...
# WORKOUT_DATABASE_ID is also supported for compatibility.Then run:
python3 run_page/notion_sync.py --full-syncOr use:
pnpm run data:download:notionThis sync path reads trips from Notion and regenerates
src/static/activities.json using the existing frontend schema.
This fork is being adapted into my personal route coverage map, similar to a web-based world-fog view. The first synced source is Ninebot e-bike trips from Notion. Future sources should be normalized into the same route schema:
- Ninebot / e-bike GPS tracks from Notion
GPXfiles. - Workout tracks from sports apps or workout Notion databases.
- Estimated subway / transit routes derived from station and time records.
All sources should eventually render together as personal trajectory lines while
keeping each route's source field explicit.
- Modify Ride Color:
RIDE_COLORinsrc/utils/const.js
- Modify
TYPE_DICT&MAPPING_TYPEinscripts/config.py - Add Type Name and add it into
RUN_TITLESinsrc/utils/const.js - Modify
colorFromType&titleForRuninsrc/utils/util.js - see commit
- or comment here
Get your Codoon data
python3(python) scripts/codoon_sync.py ${your mobile or email} ${your password}example:
python3(python) scripts/codoon_sync.py 13333xxxx xxxxuse
--with-gpxflag to save your gpx datause
--from-auth-tokenflag to login by refresh_token&user_id
example:
python3(python) scripts/codoon_sync.py 54bxxxxxxx fefxxxxx-xxxx-xxxx --from-auth-tokenGet your Xingzhe data
python3(python) scripts/xingzhe_sync.py ${your mobile or email} ${your password}example:
python3(python) scripts/xingzhe_sync.py 13333xxxx xxxxuse
--with-gpxflag to save your gpx datause
--from-auth-tokenflag to login by refresh_token&user_id
example:
python3(python) scripts/xingzhe_sync.py w0xxx 185000 --from-auth-tokenImport KML from Google Maps
- Create a map in Google Maps (keep the route in one Layer)
- Export Layer to KML file
- Rename the file to
import.kmland place it intoscripts - Modify
scripts/kml2polyline.py, fill in the trip info
# TODO modify here
# trip name
track.name = "2020-10 Tibet Road Trip"
# start/end time Year-Month-Day-Hour-Minute
track.start_time = datetime(2020, 9, 29, 10, 0)
track.end_time = datetime(2020, 10, 10, 18, 0)
# total distance
distance = 4000 # KM
# total days
days = 12
# average daily distance
hours_per_day = 6
- Execute in Console
python3(python) scripts\kml2polyline.py- @yihong0618 for Awesome running_page, Great Thanks