{"id":27086703,"url":"https://github.com/jordanrobo/workout_generator","last_synced_at":"2025-10-24T19:20:41.617Z","repository":{"id":248813338,"uuid":"829278163","full_name":"JordanRobo/Workout_Generator","owner":"JordanRobo","description":"A simple .NET console app that sends an email each morning at 5am AEST that contains a semi-randomly generated workout.","archived":false,"fork":false,"pushed_at":"2024-07-19T02:11:49.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T05:39:40.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JordanRobo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T05:52:06.000Z","updated_at":"2024-07-19T02:11:53.000Z","dependencies_parsed_at":"2024-07-20T23:01:28.574Z","dependency_job_id":null,"html_url":"https://github.com/JordanRobo/Workout_Generator","commit_stats":null,"previous_names":["jordanrobo/workout_generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JordanRobo/Workout_Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanRobo%2FWorkout_Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanRobo%2FWorkout_Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanRobo%2FWorkout_Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanRobo%2FWorkout_Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JordanRobo","download_url":"https://codeload.github.com/JordanRobo/Workout_Generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanRobo%2FWorkout_Generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259712410,"owners_count":22900038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-06T05:36:41.436Z","updated_at":"2025-10-24T19:20:36.585Z","avatar_url":"https://github.com/JordanRobo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# 🏋️‍♂️ Workout Generator\n\n## Because planning workouts is harder than doing them\n\nEver found yourself wanting to get fit but struggling with the trifecta of workout woes?\n\n1. Gym memberships cost more than your coffee addiction\n2. Planning workouts feels like rocket science\n3. Routine is the enemy of motivation\n\nWell, fear not! I've created this incredible C# console app to solve all these problems and more. Welcome to the Workout Generator, where fitness meets innovation.\n\n## Features\n\n- Generates a \"Workout of the Day\" faster than you can say \"I'll start on Monday\"\n- Emails your workout at 5am, because nothing says \"good morning\" like burpees\n- Customisable exercises and workout schemas via a `data.json` file\n- Hosted on DigitalOcean's Droplets, because even apps need a good home\n\n## How It Works\n\n1. The app wakes up at 5am, earlier than any of us want to\n2. It randomly selects a workout schema and exercises from `data.json`\n3. It crafts an email containing the workout plan\n4. The email arrives in your inbox, ready to inspire (or terrify) you when you wake up\n\n\n## Setup\n\nThese instructions assume that you have the necessary tools installed on your local Linux machine (git, dotnet SDK) and that you have a DigitalOcean account set up.\n\nRemember to replace `droplet_ip`, `from_email@example.com`, `to_email@example.com`, `smtp_port`, `smtp_address` and `from_email_password` with your actual values. \n\n*(Note: I used Google so if you are too use `smtp_address = smtp.gmail.com` and `smtp_port = 587`)*\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eInstructions for Linux Users\u003c/h3\u003e\u003c/summary\u003e\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/JordanRobo/Workout_Generator.git\n   ```\n\n2. Navigate to the cloned directory:\n   ```bash\n   cd Workout_Generator\n   ```\n\n3. Publish the application:\n   ```bash\n   dotnet publish -c Release -r linux-x64 --self-contained\n   ```\n\n4. Create a deployment package:\n   ```bash\n   mkdir -p deployment-package\n   cp -r bin/Release/net8.0/linux-x64/publish/* deployment-package/\n   ```\n\n### On DigitalOcean\n\n5. Create a new droplet on DigitalOcean through the web interface or using doctl.\n\n6. SSH into your new droplet:\n   ```bash\n   ssh root@droplet_ip\n   ```\n\n7. Update the system and install .NET runtime:\n   ```bash\n   sudo apt update\n   sudo apt install -y aspnetcore-runtime-8.0\n   ```\n\n8. Create a directory for your application:\n   ```bash\n   mkdir -p /opt/workout-generator\n   ```\n\n9. Exit the droplet SSH session.\n\n### Transferring Files\n\n10. From your local machine, transfer your application files to the droplet:\n    ```bash\n    scp -r deployment-package/* root@your_droplet_ip:/opt/workout-generator/\n    ```\n\n### Final Configuration on the Droplet\n\n11. SSH back into your droplet:\n    ```bash\n    ssh root@your_droplet_ip\n    ```\n\n12. Set up environment variables (replace with your actual email credentials):\n    ```bash\n    echo 'export EMAIL_TO_ADDRESS=\"to_email@example.com\"' \u003e\u003e /root/.profile\n    echo 'export SMTP_ADDRESS=\"smtp_address\"' \u003e\u003e /root/.profile\n    echo 'export SMTP_PORT=\"smtp_port\"' \u003e\u003e /root/.profile\n    echo 'export EMAIL_FROM_ADDRESS=\"from_email@example.com\"' \u003e\u003e /root/.profile\n    echo 'export EMAIL_FROM_PASSWORD=\"from_email_password\"' \u003e\u003e /root/.profile\n    source /root/.profile\n    ```\n\n13. Set the timezone (Replace `TIMEZONE/REGION` with your desired region):\n    ```bash\n    sudo timedatectl set-timezone TIMEZONE/REGION\n    ```\n\n14. Set up a cron job to run your application daily at 5am:\n    ```bash\n    (crontab -l 2\u003e/dev/null; echo \"0 5 * * * cd /opt/workout-generator \u0026\u0026 ./Workout_Generator\") | crontab -\n    ```\n\n15. Verify the cron job:\n    ```bash\n    crontab -l\n    ```\n\n16. Test run your application:\n    ```bash\n    cd /opt/workout-generator\n    ./Workout_Generator\n    ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eMaintaining Your Application\u003c/h3\u003e\u003c/summary\u003e\n\n- To modify exercises, SSH into your droplet and edit the data file:\n  ```bash\n  nano /opt/workout-generator/data.json\n  ```\n  \n- Remember to maintain proper JSON syntax when editing.\n\n- After making changes, you can manually run the application to test:\n  ```bash\n  cd /opt/workout-generator \u0026\u0026 ./Workout_Generator\n  ```\n\n  \u003e Tip: to make it easier to edit create a bash alias.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eTroubleshooting\u003c/h3\u003e\u003c/summary\u003e\n\n- Check application logs (if implemented) for any errors.\n- Verify that the cron job is running by checking system logs:\n  ```bash\n  grep CRON /var/log/syslog\n  ```\n- Ensure environment variables are set correctly in /root/.profile.\n\u003c/details\u003e\n\n\n### About the Developer\n\nI'm just a guy who decided that if computers can solve complex algorithms, they can surely tell me how many push-ups to do. When I'm not coding, I'm probably thinking about coding, or doing a workout that this app told me to do.\n\nRemember, the only bad workout is the one that didn't happen. So let this app be your digital fitness buddy, personal trainer, and morning alarm all rolled into one. Happy sweating!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordanrobo%2Fworkout_generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjordanrobo%2Fworkout_generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjordanrobo%2Fworkout_generator/lists"}