strong app workout logs published to strava
- Read the strong app csv workout log file locally
- Parse and convert workouts to Go workout structs
- Only send strong workouts to Strava API if they do not exist
- On a timer, pull the strong app csv workout log file from Google Drive API
- Read the strong.csv workout log file
- Parse and convert workouts to Go workout structs
- Only send strong workouts to Strava API if they do not exist
bin
: contains compiled application binaries, ready for deployment to a production servercmd/api
: contains application-specific code for the Strong API application. Includes the code for running the server, reading and writing HTTP requests and managing authentication.internal
: contains various ancillary packages used by the Strong API. It will contain the code for interacting with external services, doing data validation and so on. Basically, any code which isn’t application-specific and can potentially be reused will live in here. The Go code under cmd/api will import the packages in the internal directory (but never the other way around).remote
: contains the configuration files and setup scripts for the production servergo.mod
: file will declare our project dependencies, versions and module path.Makefile
: file will contain recipes for automating common administrative tasks — like auditing the Go code, building binaries, and executing various commands
"write calling code that is sensible, readable, and useful, and only then proceed to implement everything necessary to make it work."
"The most important reason to write tests first is that, to do that, we need to have a clear idea of how the program should behave, from the user’s point of view. There’s some thinking involved in that, and the best time to do it is before we’ve written any code."
- VSCode extention to work with csv files: Edit CSV
- Golang csv libraries
- Standard library: https://pkg.go.dev/encoding/csv@go1.19.3 easy-working-with-csv-in-golang-using-gocsv-package-9c8424728bbe
- External:
{Name:🔄6-23 Wk3: 53(1) B Day SportType:WeightTraining StartDateLocal:2023-09-20T18:02:21Z ElapsedTime:4020 Description: Distance:0 Trainer:false Commute:false}
Strong Workout {Name:TEST WORKOUT Date:2023-09-20T19:32:45Z Duration:58m0s Exercises:[{Name:Exercise A Sets:[{ID:1 Weight:140 Reps:3 Distance:0 Duration:0s Notes: WorkoutNotes: RPE:0}]} {Name:Exercise A Sets:[{ID:2 Weight:140 Reps:3 Distance:0 Duration:0s Notes: WorkoutNotes: RPE:0}]}]}
Stra:2023-09-20T18:02:21Z Stro:2023-09-20T19:32:45Z