jluttine / django-sportsteam

Web site for a sports team or club using Django.
GNU Affero General Public License v3.0
7 stars 3 forks source link

Provide calendar syncing for each player #4

Open hhorstia opened 12 years ago

hhorstia commented 12 years ago

It would be useful to be able to export match events for a whole season automatically from the season page. A preferable format would be .ics (http://en.wikipedia.org/wiki/ICalendar)

jluttine commented 9 years ago

An update to this feature request: Do not use exporting because it can't be synced and must be done for each season. Instead, use CalDAV and give each player an url which gives ALL their matches and can be synced. Thus, once a player sets this up into his calendar, he NEVER needs to touch it again and he will always receive up-to-date information about his matches in the future.

The calendar url could be for instance: mydomain.com/players/firstname.lastname/calendar

Some docs: http://calconnect.org/caldav/implementations/librariestools.html http://pythonhosted.org//caldav/

Any help/ideas is appreciated. :)

jluttine commented 9 years ago

Or is CalDAV a bit overkill for readonly calendar? Would some simpler solution be better?

jluttine commented 9 years ago

For instance, VCS/ICS: https://django-ics.readthedocs.org/en/latest/ https://pypi.python.org/pypi/django-ics-generator/0.1

jluttine commented 9 years ago

http://stackoverflow.com/questions/25384603/caldav-faster-than-than-ics-formatted-files-calendar-syncing

jluttine commented 9 years ago

Also: http://en.wikipedia.org/wiki/ICalendar

JiK commented 9 years ago

Instead, use CalDAV and give each player an url which gives ALL their matches and can be synced. Thus, once a player sets this up into his calendar, he NEVER needs to touch it again and he will always receive up-to-date information about his matches in the future.

Additional feature request: The calendar event could contain information on whether the player has rsvp'd for the match. Might be easier to remember if one sees the info directly in their calendar instead of having to open the web page every now and then to check. Perhaps you could even provide direct URLs to choices IN/OUT/? to allow one click rsvp from the calendar software.

jluttine commented 9 years ago

My android/cyanogenmod calendar does not support iCalendar URL syncing. :(

Maybe it is easy to implement a simple CalDAV communication. See for instance: http://sabre.io/dav/building-a-carddav-client/ http://blogs.nologin.es/rickyepoderi/index.php?/archives/14-Introducing-CalDAV-Part-I.html

CalDAV sends calendar data in iCalendar format, so probably it is trivial to add an iCalendar URL for those who can't use CalDAV.

jluttine commented 9 years ago

Matches need to have a version number so that it is possible to know which events have changed and need to be downloaded by the client. Maybe use autoincrementing "version" number: http://stackoverflow.com/questions/1598932/atomic-increment-of-a-counter-in-django or timestamps: https://django-model-utils.readthedocs.org/en/latest/models.html#timestampedmodel

jluttine commented 9 years ago

This seems like a useful utility (generating/parsing iCalendar): https://pypi.python.org/pypi/icalendar/ http://icalendar.readthedocs.org/en/latest/usage.html#overview