Zren / plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84 stars 23 forks source link

[EventCalendar] .ics Sync (aka iCalendar, ical, CalDAV) (Local or Remote) #57

Open tittiatcoke opened 7 years ago

tittiatcoke commented 7 years ago

As that not everyone is using Google Calendars, it would be great if the plasmoid could support an ical file (.ics) which is either local or remote. At intervals (e.g. 30 minutes) the file is checked for updates.

I know that something like this should also be possible with the Google Calendar and then importing the ics file into a calendar. I tried it and it works, however the calendar is never updated. It seems that Google reads the ics file once and then never checks anymore for updates.

Thanks :)

Zren commented 7 years ago
plasmoid.configuration.icalList = [
  {
    "url": "file:///blarg/test.ics",
    "backgroundColor": "#f00"
  }
]
Zren commented 7 years ago

Still not sure if/when I'll do this. All I did was see how hard it'd be to parse the .ics files.

Ended up with this which I could use to parse the .ics files. That's the really easy part though since I only needed to use someone else's code.

https://gist.github.com/Zren/1a3fe2d9226224720e5fc58fdd14bcee

I don't really want to depend on the calendar plugins for this (since I'd have to force the user to install KDE PIM). The KHolidays plasma calendar plugin might be nice to add though.

gujiw commented 7 years ago

Thank you for caring, but if you mind helping me : Say that I have a JSON file (converted from ICS), where can I put it in the code?

Zren commented 7 years ago

See all those checkboxes? All of those still need to be written for ics calendars to work.