plasma-applets icon indicating copy to clipboard operation
plasma-applets copied to clipboard

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

Open tittiatcoke opened this issue 9 years ago • 4 comments

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 :)

tittiatcoke avatar Jan 06 '17 13:01 tittiatcoke

  • [ ] Downloading the .ics file if remote.
  • [ ] Reading the .ics file
    • [ ] Support KIO urls (eg: gdrive:)
  • [x] Parsing the .ics to something EventCalendar can use (eg: Same JSON schema as Google Calendar)
    • I used the python3 icalendar package like the old gcal-plasmoid did from plasma4.
    • Should be able to use the executeable dataengine to run the python script like so python3 icaljson.py /path/to/test.ics 2017-07-01 2017-07-31 to query events.
  • [ ] Integrate the .ics parser into EventCalendar's QML Calendar Manager
  • [ ] Write a configuration interface
    • [ ] Easy: single textfield that seperates .ics urls with a comma
    • [ ] Hard: Multiple textfields in a column, with a button to add a new "url". With delete buttons after each url text field.
      • [ ] Use a JSON list of objects for the schema so we can also set the calendar colour.
plasmoid.configuration.icalList = [
  {
    "url": "file:///blarg/test.ics",
    "backgroundColor": "#f00"
  }
]
  • [ ] Support deleting ical events
  • [ ] Support adding events to ical
    • Will need a new "create event" UI since the simple add event text parsing is done by google.

Zren avatar Jul 20 '17 16:07 Zren

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.

Zren avatar Jul 20 '17 16:07 Zren

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?

gujiw avatar Jul 20 '17 19:07 gujiw

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

Zren avatar Jul 20 '17 21:07 Zren