Nano Banana Pro
Agent skill for nano-banana-pro
This repo will contain a simple app for planning swim workouts.
Sign in to like and favorite skills
This repo will contain a simple app for planning swim workouts.
Status: ✅ Initial implementation complete!
The app is now fully functional. You can:
trunk serve to test locally at http://127.0.0.1:8080trunk build --release to generate static files in dist/ for deploymentdist/ folder contents to GitHub PagesThe app comes pre-loaded with an example workout and calculates yardage in real-time.
The Swim Workout Planner is now fully functional and ready to use! 🎉
Complete DSL Parser (
src/parser.rs)
Real-time Yardage Calculator
Beautiful Web UI (
src/main.rs + index.html)
Build System
Documentation
# Development trunk serve --open # Production Build trunk build --release # Deploy to GitHub Pages # (automatic via GitHub Actions on push to main)
The app is ready to be shared with your swim team! 🏊♂️🏊♀️
The core idea is that users will write a workout in a domain specific language for swim workouts, that looks something like this:
200 Warmup 3x75 Choice 2x200 4x50 @ 1:00 descend 4x: - 25 Free - 50 Kick - 25 IM Order 4x100 @ 2:00 200 Cooldown
The general form is a list of a distance and a stroke or description of the exercise. Usually the stroke is something like "swim", "choice", "kick", "free", "breast", but they can basically be free form text, like "breast first and last 25, swim otherwise". The stroke is also optional, and then just "swim" or "choice" is assumed.
The distance is usually just a number of yards, but can also be written as something like 4x25, which means to swim 4 intervals of 25 yards.
Finally, there can be an optional time for the interval which is indicated by "@ 1:45", which means a one minute and 45 second interval. The interval is usually at the end, but it could come before the stroke, like "8x25 @ 40 Free", which means eight 25 yard freestyles at a 40 second interval.
The other thing here is the repeated blocks, which are like:
2x: - 2x25 swim - 100 IM
This would mean you do the whole set set under the block twice.
The format is very flexible because it's mostly meant to be read and written by humans. But there's enough structure to it that we should be able to parse it and compute on it.
This application should be a static, local-only web app. The idea is to have something that I can drop on GitHub Pages and share with my teammates in my swim club. For now, we don't need any kind of save and restore functionality, or printing. The main thing is to give a simple box where people can type their workout. But it should also annotate the workout while they are working on it with the total yardage because we generally try to make a workout that comes in at about 2000 yards.
Because Rust is my favorite language, I'd like the web app to be written in Rust, but it should compile to static files that can be self-contained. Ending up with a single HTML file at the end would be great, but downloading multiple files would be okay too.