How to get an .ics and online calendar file instead using MyGES Extranet?
I have been a student at ESGI, a member school of the Réseau GES, for 4 years now. During these many years, I had to use MyGES (school extranet), almost on a daily basis, to consult my timetable for the day. The platform occasionally encounters difficulties, which cause very long display times to obtain a simple timetable.
As the ESGI trains and graduates the best developers and IT specialists, there are multiple scripts and associated tools that were being developed to solve this issue:
-https://github.com/obito/mycal - developed in Go, this software is just here to scrap your actual calendar, and compile a .ics file based on previous scraped datas. I've experienced an issue regarding different time-zone.
-https://github.com/quantumsheep/myges-cli - developed in JS this CLI is the most advanced/amazing tool which has been done. There is an option to sync our agenda to a Google Calendar, but I wasn't able to make it work (cf. GH issue here).
-https://github.com/kidelag/agenda-ges - developed in PHP, this tool is pretty basic, but it really works like a charm, and I love it! The main problem here, was that the deployment is kind of a burden for non sysadmin/ops users.
Then, I've decided to create a Docker image based on the last software, with a specific idea in mind: make this so simple to deploy it for everyone.
You can find this small software on Docker Hub (image), and on Github (source).
-have an available VM (x64 only, no ARM support right now)
-have basic skills in technical English
-MyGES active credentials (used to login at myges.fr portal)
For any basic VM, feel free to deploy any cheap VM (GCP "F1-Micro", OVH "Starter" VPS, Scaleway "Stardust", Hetzner "CX11, etc).
Warning: This image was being developed in few hours, so I'm sure that I haven't proceeded the best way, but it works well, and it allow me to avoid using MyGES website when I need to check my agenda in few seconds.
Step 1: Prepare our system and install Docker
As usual, we need to update and upgrade our VM:
apt-get update -y && apt-get upgrade -y
And then, let's install Docker:
apt-get install docker.io # Latest Ubuntu and Debian versions only (otherwise, check other installation methods)
Step 2: Configure our environment variables
As it's stated on the readme file, there is almost no configuration to do when using this image! We just need to prepare our environment variables which are required to authenticate our user, and get our agenda!
Create a file named myges.env or clone this raw file, and it will contains this:
NICKNAME=JohnDoe MYGES_USERNAME=jdoe MYGES_PASSWORD=MyStrongPassword
And please replace current values, as following:
-NICKNAME = any name or random thing, which will be used to get your ics calendar using an specific URL
-MYGES_USERNAME = your current MyGES username
-MYGES_PASSWORD = your current MyGES password
Step 3: Spin up our container
Now, we just have one command to type, and your .ics file will be ready for you to be used!
docker run --env-file myges.env -d -p 8282:80 tjorge/myges-ics-exporter:latest # Of course, feel free to deploy it using Docker Compose if you prefer!
Feel free to choose any other port, but by default it will be exposed on 8282 publicly.
Step 4: Check for proper container operation
Now, your .ics file must be available at the following URL:
Of course, replace "YourNickname" by your previously defined value.
Step 5: Subscribe to your calendar
For this specific step, it will fully depends on your calendar provider.
For more help, please see the links below:
-Add your ICS to Google Calendar, click below:
-Add your ICS to MacOS/iCloud, click below:
-Add your ICS to Nextcloud Cal, click below:
By default, any other calendar app/server which support ICS subscription, will be fully compatible with this Docker image.
FYI, you can get more details (building, room, teacher) in addition of basic details (time details, class name), as you can see below:
Congratulations you got an .ics file for your online calendar instead using MyGES to view your timetable!