A Python Script to check the Surf Forecast
- This code is a bit rough around the edges and may need a bit of work to run, my newer code on other projects is a lot cleaner, use with caution!
See here for detailed documentation!
- Python 3.0 & Above (Download)
- Pip 21.1.2 (Pre-Installed)
- Git 2.32.0 (Download)
- StormGlass API Key (See Here)
Note: You may wish to run this script in a virtual environment, as these modules will install system-wide. To find out more, see here
- Clone the repo
git clone https://github.com/Xioto/PythonSurfForecast
- Install Python packages
# Windows cd PythonSurfForecast py -3 -m pip install -r requirements.txt # Unix cd PythonSurfForecast python3.8 -m pip install -r requirements.txt
- Run the
main.py
file usingpython main.py
- Go to Google Maps and find the Beach that you want to get a Forecast for, then Right-Click and copy the Lat & Long from Google Maps and paste it in
main.py
.
- Go to StormGlass and click "Try for Free", you will need to Sign Up, it will then redirect you to the Dashboard. It will then provide you with an API-Key, you can then paste that in
main.py
.
- To add email support, you will need to allow "Less Secure Apps" on the Google Account you are using to send the email.
WARNING - This will make your account more vunerable to less-secure apps. Learn More.
- To remove email support, either remove the code starting from
mail_content
toprint('Mail Send')
. mail_content
- Input the Content of the email you want to sendsender_address
- Input the Email Address of the Google Account above. This will be used to send the email.sender_pass
- Input the password of the Google Accountreceiver_address
- Input the address that you want to send the email to.message['Subject']
- Input the subject line of the email.
- To add discord support, you will need a Webhook URL. To get one of these, follow this guide, you will need to then paste the URL where it says
(url='DISCORD-WEBHOOK-URL')
. content
- Input the content of the Discord Message you want to send.
- Removed checking for updates and version
- Removed bad error handling
- Fixed spelling errors
- Added response.json to .gitignore
- Tidy of the readme.md
- Updated wiki
- Released on 15/03/22
- Removed amount of dots when checking version
- Making comments clearer
- Released on 15/9/21
- Removed useless comments
- Released on 20/06/21
- Leaving Pre-Release!
- Patched a bug that prevented the sorting of
response.json
. - Removed a part of the loading screen
- Patched another bug that caused multiple emails to be sent at once
- Released on 20/06/21
- Added Loading Screen
- Patched Small Bug
- Released on 14/06/21
- Added Discord Support and tidying Code.
- Released on 11/06/21
- Added Email Support and fixed Bugs.
- Released on 10/06/21
This repository is licensed under the Apache License.
I am not responsible for content on any other websites linked to from this site - the inclusion of any such links does not necessarily imply a recommendation or endorse the views expressed within them. I have no control over the nature, content and availability of those sites and you view them strictly at your own risk.
Copyright©️ 2022 Xioto