Git Product home page Git Product logo

spielerplus-calendar's People

Contributors

djbrown avatar odin568 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

odin568

spielerplus-calendar's Issues

Include Appointments with Open and Unsure Participation

Problem

Currently the personal calendar only delivers appointments whose participation is accepted.
If there are new appointments with unsure or without any personal participation, they won't show up in the data.
The user currently cannot see those appointments in his calendar, possibly unknowingly missing out on them.

Solution

Allow the user to include appointments with unsure or without any personal participation.
This could be achieved by adding an optional query parameter to the server url and argument to the command line interface.

Semantic Server Error Response

Problem

Currently, in case of any error, the server responds with 500 Internal Server Error without HTTP body.

Solution

The server should include an error message in the response body.

Further improvements (optional)

The server should reply with an appropriate HTTP response status code:

Some questions

Hi @djbrown
Just stumbled on your repo. Seems exactly what I need. I want to get calendar events as ICS for my SpielerPlus Account.
Do you have some documentation on how to use, especially how to configure? Managed to clone and start. Ended with missing config.json. Copied over the one from test - but not sure where to get the identity from...
Thanks for your help!

Add URL to ics output

Hi,
so far everything works fine.
Some things I noticed:
Using the endpoints, only the title is available as the event view returns it. This thereby does not contain i.e. "Heimspiel", etc. in our use case - but I could live with that - otherwise app would need to open each event propably, right?

But I saw you have the direct url to the event in the properties but dont write this into the ICS file. Would this be possible somehow as a html value? Not sure which key is necessary for this to work properly. Do you have any experience?

Benefit would be that it's then easy to get to details of the event itself right out of the calendar :-)

Thanks for your efforts so far - works like a charm

Add Time Zone Information to Event Datetimes

Problem

When importing/subscribing in Microsoft Outlook, it complains about "floating" (non-time-zone-specific) date time values:

Task 'Internet Calendar Subscriptions' reported error (0x00040023) : 'The VEVENT, "Practice", defined near line 9, contains a floating DTSTART. Outlook supports floating time for all-day events only.
Task 'Internet Calendar Subscriptions' reported error (0x00040020) : 'The VEVENT, "Practice", defined near line 9, contains a floating DTEND. Outlook supports floating time for all-day events only.
iCalendar Data
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//SpielerPlus//Terminkalender 1.0//DE
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALDESC:SpielerPlus Termine "Team-Name"
X-WR-CALNAME:SpielerPlus Team-Name
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
SUMMARY:Practice
DTSTART;VALUE=DATE-TIME:20230707T190000
DTEND;VALUE=DATE-TIME:20230707T210000
DTSTAMP;VALUE=DATE-TIME:20230707T161459Z
UID:event-training-123456
DESCRIPTION:http://spielerplus-server.tld/training/view?id=123456
END:VEVENT
END:VCALENDAR

The icalendar spec also sais, that floating datetimes should be avoided (see RFC 5545 - 3.3.5. Date-Time).

Solution

Set timezone to Europe/Berlin on the server.

Adjustments personal api

Hi @djbrown
as you know, I switched now from the "team" api to the "personal" api. This gives me only the relevant appointments - exactly what I need.
At the moment, our team has the Premium feature enabled which also supports ICS, but does not respect nomination or declines of appointments. So is comparable to the "team" api of your solution.

While comparing the results, I saw two differences, which should be easy to adapt:

  • If the location matches "Es ist keine Adresse vorhanden.", then the location should be ommitted in output.
  • If you remember, we added the link to spielerplus to the description. With "team" api, we only get the link, for "personal" we get the description on top. Just a minor improvement to format it differently:

Currently:

https://www.spielerplus.de/..../view?id=4711
The description of the event

Better/more consistent:

The description of the event

https://www.spielerplus.de/..../view?id=4711

I will try to bring up PRs for this.

Parsing error multi day events

Hi @djbrown
For one event, I get a parsing error. The reason might be it was a multi-day event?

Details:

Could not parse event list item:
invalid literal for int() with base 10: '00 am 17.07.'
Traceback (most recent call last):
  File "/app/spielerplus_calendar/parsing.py", line 39, in parse_event_list_items
    events.append(_parse_event_list_item(item))
  File "/app/spielerplus_calendar/parsing.py", line 60, in _parse_event_list_item
    end = _parse_end(item, begin)
  File "/app/spielerplus_calendar/parsing.py", line 103, in _parse_end
    (end_hour, end_minutes) = (int(end_hour_text), int(end_minutes_text))
ValueError: invalid literal for int() with base 10: '00 am 17.07.'
b'<div class="list event">\n        <div class="panel" id="event-event-1106819">\n                    <div class="panel-heading ">\n            <a class="event-header-border" href="/event/view?id=1106819"></a>\n            <div class="panel-heading-info">\n                <div class="panel-title">Sa.</div><div class="panel-subtitle">16.07 </div>\n            </div>\n\n            <div class="panel-heading-text">\n                <div class="panel-title">Abschlussfeier mit &#220;bernachtung </div>\n                \n            </div>\n\n            <div class="panel-drilldown">\n                \n                <i id="w0" class="fa-drilldown sp fa-sm" style="color: #FFFFFF;"></i>\n            </div>\n            <img class="bg" src="//assets.spielerplus.de/assets/22126a30971e28255886e108619ddfa820dc/images/assets/panel_background_darkgreen_soccer.jpg" alt="">\n        </div>            <div class="panel-content">\n                        <div class="event-time">\n            <div class="col-xs-4">\n                <div class="event-time-item">\n                    <div class="event-time-label">Treffen</div><div class="event-time-value">-:-</div>\n                </div>\n            </div>\n            <div class="col-xs-4">\n                <div class="event-time-item">\n                    <div class="event-time-label">Beginn</div><div class="event-time-value">17:00</div>\n                </div>\n            </div>\n            <div class="col-xs-4">\n                <div class="event-time-item">\n                    <div class="event-time-label">Ende</div><div class="event-time-value">13:00 am 17.07.</div>\n                </div>\n            </div>\n        </div>\n\n\n<!-- CARPOOL USAGE -->\n\n\n<!-- ASSIGNMENTS -->\n\n\n<!-- TOURNAMENT -->\n\n<!-- FITNESS USAGE -->\n\n\n                <!-- EVENT COUNTDOWN -->\n                <div class="list-item small countdown red"><div class="list-icon size-16"><i id="w1" class="fa-countdown sp fa-fw fa-sm" style="color: #D63636;"></i></div><span id="sp-event-countdown-1106819">Zeit zum Zu-/Absagen abgelaufen</span></div>            </div>\n            <div class="participation-flex">\n                <!-- EVENT PARTICIPATION -->\n                <div class="participation-widget participation-widget-event-1106819" style="position:relative; display: inline-block;"><div class="btn-group participation-widget-buttons"><button type="button" class="participation-button selected" disabled title="Zugesagt" style="background-color: #87ce7d; color:white" onclick=\'showParticipationForm("event", 1106819, 1, 6440999)\'><i id="w2" class="fa-participation-yes sp fa-fw fa-lg" style="color: #FFFFFF;"></i><div class="participation-number">16</div></button><button type="button" class="participation-button" disabled title="Unsicher" style="background-color: #fff; color:dark-grey" onclick=\'showParticipationForm("event", 1106819, 2, 6440999)\'><i id="w3" class="fa-participation-maybe sp fa-fw fa-lg" style="color: #535353;"></i><div class="participation-number">0</div></button><button type="button" class="participation-button" disabled title="Absagen / Abwesend" style="background-color: #fff; color:dark-grey" onclick=\'showParticipationForm("event", 1106819, 0, 6440999)\'><i id="w4" class="fa-participation-no sp fa-fw fa-lg" style="color: #535353;"></i><div class="participation-number">0</div></button></div></div>                <button type="button" class="participants-button" title="Teilnehmer anzeigen" onclick=\'showParticipation("event",1106819)\'><i id="w5" class="fa-nav-members sp fa-fw fa-2x" style="color: #44AD34;"></i></button>            </div>\n        </div>\n    </div>\n'

Performance personal api

Hi @djbrown ,
I use with success the teams endpoint of your app, which queries quite fast (as it uses the calendar overview html).
The personal API also works but needs (at least on my RaspberryPi) almost 3 minutes to give the response. This is too much for at least my App "ICSx⁡". Did not try how it would behave if I import the calendar via i.e. Google and let google update it.
Do you have any experience for this?
Is it due to my Raspberry infra or too many events? Perhaps parallizing requests might give a bump but of course we should not be detected as a DDoS attack πŸ˜„
Many thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.