add: support for multiple ICS and Google calendars.#115
Conversation
urlib3 version requirements had to be fixed. Also removed deprecated .utcnow()
|
Hi @KaeroDot thanks for the PR and appreciate your time, but apologies, I'm not looking to merge this, the reason is it's bringing the project to a complexity I'm just not comfortable with. It's also making the providers' behaviour mixed, and tbh ICS has been a pain to deal with, so I'm not keen on expanding it. But this does inspire me to consider whether I should ANDing the providers instead of ORing the providers as right now so at the very least thanks for that. |
|
Ok, so I will have to divert my fork. |
|
Ahhhh that's actually a good point. It makes more senseenseand multiple Google calendars than different providers. OK I'll want to think on this a bit more because I also have to think of how I'm going to be testing each time I make changes which would go dramatically up, also want to provide consistency across all providers by allowing multiple. Right now I'm leaning up just stick to single instances like now because it's simpler. OK let me reopen for now while this serves as a feature request: allow multiple instances of calendars from same provider. |
|
Yes, that is the issue of my pull request, I was not able to make the code for all types of providers. But it shows a way how to do it, it is tested for google and ics and it is backward compatible - it will not affect people who use only one calendar. |
|
Alright I've finally got something in progress here: https://github.com/mendhak/waveshare-epaper-display/pull/116/changes I've moved from env.sh to config.toml, this was long overdue anyway. Moving to toml is useful here because it allows for any number of calendar providers in any combination. As part of this I'm having to do some clean up and cache refactoring, so I think it'll take a bit of testing. The key bit here is the config.toml.example file. It's a big change from env.sh but I feel it's necessary anyway, the env.sh was a 'temporary' thing that stuck around for too long |
|
#116 is almost ready so I'm closing this PR thanks. |
|
#116 is merged, so now the project structure has changed and there's a toml file instead of .env. |
|
Hi @mendhak thanks for doing this. I only have one calendar - my Apple calendar ics (on an RPI running apache2). It works well although it only completely refreshes the events at midnight rather than at their actual end times! Not sure why. |
|
Hi @feh123 to update I would suggest taking a backup of your current folder, just in case. eg 'waveshare-epaper-display-backup' Then redownload this repo again, the structure has changed completely. Importantly, the configuration is now in a config.toml instead of env.sh. Do the README initial setup, the python environment, pip install, etc. Then make a copy of your old env.sh into the new folder. Now, when you run.sh, it will complain, and tell you to run When you run Then it should work. |
|
Hi @mendhak
Thanks for the detailed advice, much appreciated. It seems a very clever way to make the .toml config! I will try to upgrade to the new structure in the next few days. My office is currently at 29C and no place to work in pleasurably.
Thanks again
Fred On Thursday, 25 June 2026 at 06:50:27 BST, mendhak ***@***.***> wrote:
mendhak left a comment (mendhak/waveshare-epaper-display#115)
Hi @feh123 to update I would suggest taking a backup of your current folder, just in case.
Then redownload this repo again, the structure has changed completely. Importantly, the configuration is now in a config.toml instead of env.sh
Then make a copy of your old env.sh into the new folder.
Now, when you run.sh, it will complain, and tell you to run .venv/bin/python3 utils/migrate_env_to_toml.py.
When you run .venv/bin/python3 utils/migrate_env_to_toml.py it will generate a config.toml file output for you. Copy that into a new config.toml file, remove the env.sh, then run again.
Then it should work.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Hi @mendhak although still very hot did have a try after cloning my current sd card! It all seemed to go well and your "copy. to toml script" was great. But I have hit a problem - undoubtedly somewhere I am making a mistake with the syntax of .toml files as I cut and paste into the config.toml. |
|
Oh sorry you're running into that @feh123 You do have another option, you can do a startover and copy config.example.toml to config.toml. Then start editing the sections one by one. For metoffice just use 'metoffice' as the provider. Here is my config.toml for reference anyway |
|
Do share the error you ran into as well in case it's something obvious that I missed. It might be easier to track this if you create a new issue, this is a closed PR |
I have added support for up to 5 google calendars and up to 5 ics calendars. All available calendars are fetched, events sorted and displayed together according the event start date. Personally I need to show up events from 2 google calendars and one ics calendar. I use my own layout with more calendar space (I will share this later).
Unfortunately I haven't got outlook or caldav calendars to test them also.
I had to modify time zone operations so the events from all calendars can be joined into one compatible array and properly sorted. Hopefully I have chosen proper approach.
Additionally, urlib3 version requirements had to be loosened otherwise I got compatibility issues:
The user requested urllib3==2.5.0
icalevents 0.3.0 depends on urllib3>=1.26.5
requests 2.28.1 depends on urllib3<1.27 and >=1.21.1
I have removed deprecated .utcnow().