Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Import: seated leg curl stays seated, never-by-title lifts stay out of the Hevy id map too (#784, #785)
Adrián Fernández1ed702f1f601
diff --git a/frontend/src/lib/hevy-id-map.js b/frontend/src/lib/hevy-id-map.jsindex cb2420bd9..e14a63e68 100644--- a/frontend/src/lib/hevy-id-map.js+++ b/frontend/src/lib/hevy-id-map.js@@ -1,10 +1,10 @@// AUTO-GENERATED by scripts/build-hevy-id-map.mjs — do not edit by hand.// Hevy exercise_template id → openGym catalogue id, plus English title → id for CSV exports// (Hevy CSV has titles, not template ids). Regenerated from the Hevy templates API +-// verified title aliases. Three title aliases whose catalogue match was wrong (side plank → hip-// adduction, machine squat → barbell squat, cable reverse fly → a lever machine) are left out;-// those titles import as custom exercises.-// 300 mapped · 151 left unmatched (import as custom).+// verified title aliases. Three titles whose catalogue match was wrong (side plank → hip+// adduction, machine squat → barbell squat, cable reverse fly → a lever machine) are left out of+// both tables; they import as custom exercises.+// 297 mapped · 154 left unmatched (import as custom).// Source templates: 451 (built-in only).export const HEVY_ID_MAP = {@@ -236,7 +236,6 @@ export const HEVY_ID_MAP = {"BE289E45": "0178","BE640BA0": "7744","BF6ECE89": "0431",- "C315DC2A": "0602","C3BCABB3": "0218","C43825EA": "0279","C469EA70": "0597",@@ -246,7 +245,6 @@ export const HEVY_ID_MAP = {"C7973E0E": "0739","C7AE420A": "0688","C8706C80": "0624",- "CC35A01F": "0043","CC55119B": "0979","CD6DC8E5": "0830","CDC472B1": "1605",@@ -278,7 +276,6 @@ export const HEVY_ID_MAP = {"DE68C825": "0192","DF200976": "0977","E05C2C38": "0605",- "E3EDA509": "1775","E53CCBE5": "1372","E5988A0A": "0380","E644F828": "1258",diff --git a/frontend/src/lib/import-csv.js b/frontend/src/lib/import-csv.jsindex f6246f96e..4f52936a1 100644--- a/frontend/src/lib/import-csv.js+++ b/frontend/src/lib/import-csv.js@@ -210,7 +210,7 @@ const ALIAS_EX = {'overhead press': '0091', 'military press': '0091', 'shoulder press': '0091', ohp: '0091','barbell row': '0027', 'bent over row': '0027', 'bent-over row': '0027','dumbbell row': '0292', 'one arm dumbbell row': '0292',- 'leg curl': '0586', 'lying leg curl': '0586', 'seated leg curl': '0586',+ 'leg curl': '0586', 'lying leg curl': '0586', 'seated leg curl': '0599','leg press': '0739', 'leg extension': '0585','calf raise': '1372', 'standing calf raise': '1372', 'seated calf raise': '0088','lateral raise': '0334', 'side raise': '0334', 'reverse fly': '0348', 'rear delt fly': '0348',diff --git a/frontend/src/lib/import-hevy.test.js b/frontend/src/lib/import-hevy.test.jsindex afd6d4fe8..aa12f3d85 100644--- a/frontend/src/lib/import-hevy.test.js+++ b/frontend/src/lib/import-hevy.test.js@@ -75,7 +75,6 @@ describe('HEVY_ID_MAP', () => {'914F3A96': '0327', // Chest Supported Incline Row (Dumbbell)'98237BA2': '0826', // Knee Raise Parallel Bars'4E5257DE': '6392', // Lat Pulldown - Close Grip (Cable)- C315DC2A: '0602', // Rear Delt Reverse Fly (Cable)FFDA283B: '0381', // Reverse Lunge (Dumbbell)'8BAB2735': '0318', // Seated Incline Curl (Dumbbell)'9237BAD1': '1454', // Seated Shoulder Press (Machine): its artwork is 1454, 0603's a landmine press@@ -90,6 +89,11 @@ describe('HEVY_ID_MAP', () => {})}+ it('leaves the never-by-title lifts out of the id map as well', () => {+ // Side Plank, Squat (Machine), Rear Delt Reverse Fly (Cable)+ for (const id of ['E3EDA509', 'CC35A01F', 'C315DC2A']) expect(HEVY_ID_MAP[id]).toBeUndefined()+ })+it('leaves catalogue gaps unmapped (import as custom)', () => {for (const id of ['68CE0B9B', '0222DB42', 'D1CD146F']) {expect(HEVY_ID_MAP[id]).toBeUndefined()diff --git a/frontend/src/lib/import-match.test.js b/frontend/src/lib/import-match.test.jsindex f90397d33..6dba89f8b 100644--- a/frontend/src/lib/import-match.test.js+++ b/frontend/src/lib/import-match.test.js@@ -41,6 +41,8 @@ describe('foreign exercise names resolve to the catalogue', () => {it('keeps the qualified variants distinct', () => {expect(matchExercise('Kettlebell Goblet Squat')).toBe('0534')expect(matchExercise('Dumbbell Goblet Squat')).toBe('1760')+ expect(matchExercise('Lying Leg Curl')).toBe('0586')+ expect(matchExercise('Seated Leg Curl')).toBe('0599')})// The word-bag is order-insensitive, which is what lets one alias cover the two waysdiff --git a/scripts/build-hevy-id-map.mjs b/scripts/build-hevy-id-map.mjsindex 466e834e2..9bed8c8e9 100644--- a/scripts/build-hevy-id-map.mjs+++ b/scripts/build-hevy-id-map.mjs@@ -40,7 +40,8 @@ function hevyApiKey() {* are intentionally omitted so they import as custom exercises.*/// Titles whose closest catalogue entry is a different movement — better a custom exercise than-// a wrong one. Keep in sync with the note at the top of the generated map.+// a wrong one. Left out of both tables, so the API import (by template id) skips them too.+// Keep in sync with the note at the top of the generated map.const NEVER_BY_TITLE = new Set(['side plank', 'squat (machine)', 'rear delt reverse fly (cable)'])const BY_TITLE = {@@ -261,11 +262,11 @@ async function main() {const unmatched = []for (const t of templates) {if (!t?.id || t.is_custom) { if (t?.id && t.is_custom) unmatched.push(t); continue }- const id = resolve(t)+ const titleKey = String(t.title || '').trim().toLowerCase()+ const id = NEVER_BY_TITLE.has(titleKey) ? null : resolve(t)if (id) {map[t.id] = id- const titleKey = String(t.title || '').trim().toLowerCase()- if (titleKey && !NEVER_BY_TITLE.has(titleKey) && !titleMap[titleKey]) titleMap[titleKey] = id+ if (titleKey && !titleMap[titleKey]) titleMap[titleKey] = id} else unmatched.push(t)}