Make ics files read only / writable calDAV - calendar

I have a question regarding calDAV servers and .ics calendar files.
Is it possible, to make certain VEVENTS read-only and others writable?
The user should not be allowed to change every VEVENT in his calendar only some selected by
me.
Thanks!

Related

how to use webcal protocol

I want to create a file, that will be accessed by using the webcal:// protocol.
The final goal is to let the user subscribe to a shared calendar, and I know that this can be done in a million different ways, and that webcal has disadvantages, but please treat this question as a technical question about webcal and don't offer alternatives.
What should be its content, if I want it to allow a user to subscribe to a shared calendar?
How should I host such a file? Most of the servers I know support only http/s queries.
Thx!
Please refer to the RFC5545 shared calendar (ics)n specification https://www.rfc-editor.org/rfc/rfc5545 for the format of contents of the ics calendar files.
Note that webcal is an unofficial apple protocol for ics calendar files. Google and other calendar providers use https for their shared calendars. These can be hosted on most servers. An ics url is literally just a file (or active url). If you persist in using webcal protocol only, some calendar applications may not accept so I strongly suggest the official 'alternative'.
From page 5 of the specification
"The iCalendar format is suitable as an exchange format between
applications or systems. The format is defined in terms of a MIME
content type. This will enable the object to be exchanged using
several transports, including but not limited to SMTP, HTTP,....."

Do internet calendar subscriptions (i.e. an ics url) automatically delete past events?

I subscribed to an internet calendar (the kind with a url ending in .ics), and I noticed that in my calendar clients, future events will update just fine, but past events quickly disappear. Is this standard behavior for internet ical subscriptions? Or is it due to a particular configuration, either on the side of the calendar provider, or on the side of my client?
I didn't see any options in my client for "sync older events" or anything like that, so if it's either of the first two scenarios, are there any programs (ideally on either Android or Windows) that could essentially subscribe to an internet calendar and copy its events onto a different, local calendar, so as to preserve them indefinitely?
After doing some digging, I've determined the following:
There is no standard time window that internet calendars sync events.
That is determined by the provider of the internet calendar, and cannot be changed by a subscriber.
There are no common, universally applicable utilities that automate the copying of events from one calendar to another (in part because, on non-smartphone operating systems, the storage and management of calendars varies wildly by client).
However, Calendar Cloner is a free, open-source program that can be compiled and run on Android, which does automate the copying of events from one calendar to another. It does not support much complexity in terms of rules, but it gets the job done.
The simplest viable alternative for Windows might be to subscribe to the internet calendar in Outlook, then write a VBA macro (perhaps based off this one) to copy events to a new calendar. (That new calendar could be synced to other devices via various plugins that sync Outlook with Google Calendar or CalDAV calendars).

Synchronizing events of my system into most widely used calendars

I have implemented a (sports field) booking system. I would like to add one feature: when a customer makes a booking I would like to offer him the possibility to get/sync his newly created entry in his own calendar.
One solution what I already found is to create an iCalendar feed for the customer with his bookings. So he can take this feed (basically an URL pointing to a user-specific .ics file) and integrate it into his calendar applications (as most will support the addition of external calendars).
One bottleneck with this solution is that a good amount of customers use Gmail and its calendar. And it may take some time until Gmail refreshes external calendars. So it may take up to few hours until the newly created entry appears in the customers calendar.
Of course there's no such problem when customer is using calendar apps which offer more frequent or on-demand synchronization.
So my question here: what other solutions can you recommend? An export in a file for the newly created event? Or any other technology to sync our bookings with the most widely used calendars? What would be the most usable solution for customers?
If you want to be able to auto update / synchronise the booking by having the user subscribe, then the ics feed is the standard cross application way to do it.
If it is just one booking and is never going to be updated, then you could encourage them to import the ics file to their calendar which usually then appears within seconds.
You can also email them the ics file. It is then not subscribeable as it is NOT a url. How it is handled depends on their email and system setup, but most would offer import into their calendar. (Mine opens in notepad++) ;)

Is date modified of the files shows that the file has been used by lighttpd or not?

IS date modified of the files shows that the file has been used by lighttpd or not?
I am trying to clean my hardisks becouse they are now a buttle neck problem, they are full of data, I need to know how to find the files that lighttpd didn't stream to users more that 1.5 years to delete thes becouse they are not in use.
Is date modefided is the best solution for that?
Thanks
Absolutely not. Date modified is not a good indication of access.
If you have web logs, you should consult those for what was served by lighttpd.
Absent that, you might look at atime (access time) instead of mtime (modification time) if your server is configured to track atimes and you do not have anything crawling the volume which would update the atimes. (You'll have to look at your server yourself to answer that question. Nobody can answer it for you.)

How do I repeat events in an ICS file every x seconds?

I'm trying to set up calendar events in macOS Sierra's Calendar that repeat every 2,551,440 seconds (which happens to be the synodic period of the Moon). This system uses the ICS specification.
Ultimately, I want a calendar that provides the Moon rise and set times for my location, and it also needs to list the Lunar phase (e.g. Full Moon, New Moon, etc.). I have found plenty of examples on the Internet where people have manually created the events, but that's incredibly tedious (one event per day for years!), and they're based on different time zones (and so are of no use to me).
I have seen from the ICS specifications that the file format itself supports events that recur every x seconds. I exported an event as an ICS file (from Calendar), and then edited the ICS file in a text editor, but I must've got the code wrong, as it didn't re-import into macOS Calendar with the correct repeat interval. Instead, it imported a single event with no repetition. It's also possible that I got the code right, but Calendar discarded it upon import...
Can someone please explain how to go about doing this?
I found the RRULE Generator, but that only supports hourly intervals, not seconds, and so is not precise enough for my needs.
I considered running a bash script to generate the event (which would run as a cron job every 2,551,440 seconds), but that would only give a month's notice. I'd prefer to have it set up indefinitely.
Another option may be to write a script in Python to create individual ICS event files; this would also be tedious...
I understand that this can't be done in Calendar directly; the solution will most likely be manually editing each ICS file to set up the recurrence correctly, and then importing them into Calendar... I just don't know how...
...or is there a calendar application somewhere out there that lets you set up events that recur every x seconds? If so, I could create the event in that, export it and then import it into Calendar...
Thanks in advance for any thoughts.
So, I figured this one out.
Apple Calendar, Google Calendar, and pretty much all calendar applications don't support events that repeat every x seconds. The ICS format itself does, just not the programs.
The Moon is in an inclined orbit, so this is an inappropriate solution for what I wanted anyway.
The US Navy has an API that publishes rise/set and phase data for the Moon. I saved the responses from this page (a JSON file), and did some Python code to extract the required data, and then made a Python script to create the separate .ICS files for each event (one event per Moonrise) (i.e. not one event that repeats every x seconds). I then imported those ICS files into macOS Calendar.
Hope this helps someone else who needs to deal with a similar situation in future...

Resources