This is a simple Discord WebHook Planner 📅, which allows you to fetch your events from a .ics online and display them in Discord through a webhook.
It displays 2 categories of events:
- courses, which are displayed as a list of events for the current day. It also displays the hour of the first and last event of this category.
- important, which are important events that are displayed as a list of events for the current day.
Moreover, it displays the events of today and tomorrow, but only if there are events for these days.
Besides, it displays a weather forecast for the day.
Else, it doesn't send a message.
It uses a .env
file which contains your personal data, see .env.example
:
This little script is made to work with specifics .ics file; it assumes that your relevant events:
- are in the
VEVENT
section of the file, and that theSUMMARY
field contains the name of the event. - have the property
CATEGORIES
set toCours
if it is a course, orImportant
if it is an important event.
I personally used Calendar.online as it is free, allow to fetch multiple data sources and can be edited by anyone from a link without login.
The script also fetch the weather for the day and the following day from OpenMeteo. As OpenMeteo is API-key free, it is not necessary to get one.
Get Go or see releases
First import the dependencies with go get -d ./...
.
Then update the .env
file with your own data:
WEBHOOK_URL= # Your webhook URL
ICS_URL= # Your .ics URL
AVATAR_URL= # Your avatar URL
LONGITUDE= # The longitude of where you'd like to know the weather
LATITUDE= # The latitude of where you'd like to know the weather
Finally just run go run main.go
and it will fetch the set ics and sent the data to your webhook.
You could also build it with go build main.go
and run it with ./main
.
This project is under the MIT License - see the LICENSE file for details.
Developed with GO 19
And the following dependencies: