From edbdd91276ae454f122b15d484237ff1ad96aea4 Mon Sep 17 00:00:00 2001 From: timothy Date: Wed, 23 Sep 2026 20:34:32 +0200 Subject: [PATCH 1/6] feat(activity): add searchable strength exercise picker --- .gitattributes | 5 + NOTICE.md | 20 + docs/notice.html | 25 + lib/data/db.dart | 49 +- lib/l10n/app_de.arb | 11 + lib/l10n/app_en.arb | 54 + lib/l10n/app_es.arb | 11 + lib/l10n/app_fr.arb | 11 + lib/l10n/app_hi.arb | 11 + lib/l10n/app_zh.arb | 11 + lib/ui2/activity/catalogue.dart | 243 +- lib/ui2/activity/exercise_picker.dart | 342 + lib/ui2/activity/live.dart | 243 +- lib/ui2/activity/summary.dart | 8 +- lib/ui2/activity/wger_exercises.g.dart | 23601 +++++++++++++++++++++++ lib/ui2/screens/workout_screen.dart | 32 +- test/db_strength_schema_test.dart | 56 + test/ui2_activity_test.dart | 152 +- tool/update_wger_exercises.dart | 420 + 19 files changed, 25169 insertions(+), 136 deletions(-) create mode 100644 lib/ui2/activity/exercise_picker.dart create mode 100644 lib/ui2/activity/wger_exercises.g.dart create mode 100644 tool/update_wger_exercises.dart diff --git a/.gitattributes b/.gitattributes index 6a2348052..a00ea5ca1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,3 +9,8 @@ # Dart file in the repo, which is a working-tree-wide change with nothing to do # with reviewable diffs. *.dart diff + +# Rebuilt from wger by tool/update_wger_exercises.dart. GitHub keeps generated +# data available but collapses its 20k+ lines so the importer remains the review +# surface. +lib/ui2/activity/wger_exercises.g.dart linguist-generated=true diff --git a/NOTICE.md b/NOTICE.md index 97c3ad5d9..f5ddaac18 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -9,3 +9,23 @@ in this repository. The Bluetooth protocol support in this project was independently developed by observing the band's own Bluetooth communications; see [the protocol repo's README](https://github.com/OpenStrap/protocol) for methodology notes. + +## wger exercise data + +The generated exercise catalogue in +`lib/ui2/activity/wger_exercises.g.dart` contains selected fields from the +[wger](https://wger.de) exercise database. wger licenses the base exercise and +each translation separately. Each generated row therefore retains its source +UUID and every distinct author/license pair used by its base metadata, labels, +or aliases. Entries are individually available under CC BY-SA 3.0, CC BY-SA +4.0, or CC0; the applicable credits are recorded on that row. The picker links +each imported exercise to its exact public wger record, where the source, +license, and any author information supplied by wger can be inspected. + +Edge adapts the source by selecting fields, normalizing whitespace, sorting +records, and omitting descriptions, notes, images, and videos. No exercise +content is fetched while the app is running. + +The generated dataset is separate from Edge's MIT-licensed application code. +Refresh it with `dart run tool/update_wger_exercises.dart`; the importer rejects +an unfamiliar license rather than silently shipping it. diff --git a/docs/notice.html b/docs/notice.html index 3c953676f..9b0f57bec 100644 --- a/docs/notice.html +++ b/docs/notice.html @@ -55,6 +55,31 @@

Open Food Facts

purposes. Edge treats a scanned figure as something you entered, never as something it measured, and drops any value that fails a basic plausibility check rather than showing it to you.

+ +

wger exercise data

+ +

Edge's exercise picker contains a versioned offline snapshot of selected + fields from the wger exercise database. + The app does not contact wger while you browse or record a workout.

+ +

wger licenses the base exercise and each translation separately. Each + record shipped by Edge retains its source UUID and every distinct + author/license pair used by its base metadata, labels, or aliases. The + snapshot currently accepts records under + CC BY-SA + 3.0, + CC BY-SA + 4.0, or + CC0. + The generated dataset remains under those licenses and is separate from + Edge's MIT-licensed application code. The source/credits button beside + each imported exercise opens its exact public wger record, including the + license and any author information supplied by wger.

+ +

Edge adapts the source by selecting exercise names and aliases, muscle + classifications, equipment, categories, and translation labels; + normalizing whitespace; and sorting the result. It contains no wger + images, videos, notes, or exercise descriptions.