- Flutter Android app on CookIT's stack (provider, shared_preferences, gen-l10n) - tools/exercise-import turns free-exercise-db into 876 bundled Exercises with 1,746 WebP images (20 MB); stretching -> Stretching, rest -> Workout - ZenStyle tokens per Mode: calm rounded sage/teal with breath ripples vs. dark ember-to-red with floor-tape slashes; the theme morphs at each Mode's own pace - Remembered global Mode switch, Plans / Library / History tabs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
765 B
Python
26 lines
765 B
Python
"""Usage: python convert.py <free-exercise-db checkout> [output folder]
|
|
|
|
The output folder defaults to the app's assets/exercises.
|
|
"""
|
|
|
|
import collections
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
from exercise_import import run
|
|
|
|
|
|
def main() -> None:
|
|
if len(sys.argv) < 2:
|
|
sys.exit(__doc__)
|
|
source = Path(sys.argv[1])
|
|
output = Path(sys.argv[2]) if len(sys.argv) > 2 else Path(__file__).resolve().parents[2] / "assets" / "exercises"
|
|
exercises = run(source, output)
|
|
modes = collections.Counter(e["mode"] for e in exercises)
|
|
size = sum(f.stat().st_size for f in (output / "images").glob("*.webp"))
|
|
print(f"{len(exercises)} Exercises ({dict(modes)}), images {size / 1_000_000:.1f} MB -> {output}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|