• 0

Most basic calendar for integration with webapp


Question

I'm looking to build a web app purely for my own personal use.  What I want to do is:

  • Show a list of days
  • For each day have a drop-down of 3 options - only 0 or 1 can be selected
  • When selecting an option, store this data to database (date, option chosen)
  • When changing an option (even to the not-set state) store this data to database overriding what was set (date, option chosen)

All the above is simple.  However, here's the bit I don't get yet:

  • When selecting or changing an option - create a calendar event in either iCloud or Alexa calendar to represent the option chosen
  • If an event already exists on that date - delete it and then create a new one

I would prefer this to work with iCloud calendar, but I fear that there's little integration ability here with my chosen language (PHP).

Could I even just output the database content in a relevant format and subscribe to it from iCloud calendar?

Any steering would be useful.  Thanks

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
On 12/01/2024 at 14:41, Dick Montage said:

I'm looking to build a web app purely for my own personal use.  What I want to do is:

  • Show a list of days
  • For each day have a drop-down of 3 options - only 0 or 1 can be selected
  • When selecting an option, store this data to database (date, option chosen)
  • When changing an option (even to the not-set state) store this data to database overriding what was set (date, option chosen)

All the above is simple.  However, here's the bit I don't get yet:

  • When selecting or changing an option - create a calendar event in either iCloud or Alexa calendar to represent the option chosen
  • If an event already exists on that date - delete it and then create a new one

I would prefer this to work with iCloud calendar, but I fear that there's little integration ability here with my chosen language (PHP).

Could I even just output the database content in a relevant format and subscribe to it from iCloud calendar?

Any steering would be useful.  Thanks

I was hopeful until I read PHP. Maybe something like this for icloud? https://github.com/zubini/php_icloud_calendar

Or alternatively this for Alexa skills: https://github.com/maxbeckers/amazon-alexa-php

----

I know you're probably not looking for alternate languages and I'm not sure how comfortable you are with Python, but a few years ago I started using Django for my web projects instead of PHP and I found it pretty easy to pick up. If you were to consider using that, you could use something like this: https://github.com/jazzband/django-ical or this: https://github.com/picklepete/pyicloud

I'm curious to see how you crest this hurdle so keep us posted!

----

Edit: I reread your post and saw this: "Could I even just output the database content in a relevant format and subscribe to it from iCloud calendar?"

I went to this website to see if I could generate an ics file using basic event information: https://ical.marudot.com/

This is the information I entered regarding the event itself:

image.png.95763628f775583823177a10a06896d4.png

This is the information I entered regarding the feed name:

image.png.fe232d50b0988e2afcfb808054914436.png

The following is the contents of the .ics file it generated:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ical.marudot.com//iCal Event Maker
X-WR-CALNAME:Test Feed Title
NAME:Test Feed Title
REFRESH-INTERVAL;VALUE=DURATION:P1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Havana
LAST-MODIFIED:20230407T050750Z
TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Havana
X-LIC-LOCATION:America/Havana
BEGIN:STANDARD
TZNAME:CST
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
DTSTART:19701101T010000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:CDT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
DTSTART:19700308T000000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20240112T204354Z
UID:1705092190603-72779@ical.marudot.com
DTSTART;TZID=America/Havana:20240112T100000
DTEND;TZID=America/Havana:20240112T120000
SUMMARY:Test Event Title
URL:https://test-url.example
DESCRIPTION:Test Description
LOCATION:Test Location
TRANSP:TRANSPARENT
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
CLASS:PUBLIC
END:VEVENT
END:VCALENDAR

If you could generate an ics file that looks like that, I think you're in business.

Edited by satukoro
  • Like 1
Link to comment
Share on other sites

  • 0

So iCal is not really a "subscription" but rather an "import".

If there's some format I can subscribe to, where my output can change and the calendar reflect that.  This would maybe work.

 

Link to comment
Share on other sites

  • 0
On 13/01/2024 at 09:43, Laser said:

Have you looked at fullcalender? it is a robust full featured calendar that is under active dev.

Here is a sample of integrating it in php

PHP Event Calendar using FullCalendar JS Library - CodexWorld

This looks interesting, thanks!  And while that's great - I can't subscribe to it from cloud calendars or so on.  Usefully interesting nonetheless though, thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.