Opened 18 months ago

Closed 14 months ago

Last modified 12 months ago

#14122 closed enhancement (fixed)

WeekPlanPlugin: ical recurring events support

Reported by: anonymous Owned by: lucid
Priority: normal Component: WeekPlanPlugin
Severity: normal Keywords: ical
Cc: Trac Release:


#14110 added ical support, but not for recurring events.

pypi:recurring-ical-events could be used to support recurring events.

Attachments (0)

Change History (4)

comment:1 Changed 18 months ago by anonymous

pypi:icalendar also links another library pypi:icalevents

comment:2 Changed 14 months ago by anonymous

The first library above seems to work:


    diff -r 86ee9613a30f -r cf7c273c3fcb
    a b  
    1919            'weekplan.ical_provider = weekplan.ical_provider',
    2020        ]
    2121    },
    22     install_requires=['icalendar'],
     22    install_requires=['icalendar', 'recurring-ical-events'],
  • weekplan/

    diff -r 86ee9613a30f -r cf7c273c3fcb weekplan/
    a b  
    22import datetime
    44from icalendar import Calendar
     5import recurring_ical_events
    67from trac.config import ConfigSection
    78from trac.core import Component, implements
    3536            f = urllib.urlopen(ical_url)
    3637            content =
    3738            calendar = Calendar.from_ical(content)
    38             return calendar.walk()
     39            entries = calendar.walk()
     40            if range is not None:
     41                r0, r1 = range
     42                recurring_events = recurring_ical_events.of(calendar).between(r0, r1)
     43                entries.extend(recurring_events)
     44            return entries
    4046        def is_relevant(entry):
    4147            if != "VEVENT":

comment:3 Changed 14 months ago by lucid

Resolution: fixed
Status: newclosed

In 18497:

WeekPlanPlugin: ical recurring events support
(fix #14122)

Fix AttributeError: '' object has no attribute 'date' (fix #14149)

Fix extras_require (see #14110)

comment:4 Changed 12 months ago by anonymous

Apparently this library already returns also non-recurring events, so those now appear twice by mistake. The calendar.walk() should be skipped when this library is used.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain lucid.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.