iCal feeds & date ranges - icalendar

I'm trying to understand how iCal feeds & iCalendar clients deal with a large number of events in the past & in the future. Is there any way in which iCalendar clients can communicate a date-range to an iCalendar feed -- so that events outside the current date range being shown to the user are not needlessly sent down the wire.
If not, how does the iCalendar feed decide which date ranges to send the events for? If one keeps sending all the data down the wire, at some point it's going to become unmanageable for, both, the feed & the client. If the feed doesn't send data far back in the past & far out in the future, how do clients handle these 'holes' in the data?

you need to differentiate between the application side which is the event feed and icalendar (rfc5545) which is "just" the standard for
data format for representing and exchanging calendaring and scheduling information
in other words from the icalendar file format will only carry whatever information the server has been programmed to put in it. There is no predefined behaviour for calendar feeds in rfc5545.
for events feeds if you do not control the server, it would be safe to assume that the feed is only showing upcoming events and your question could be related to :
How Do I Fetch All Old Items on an RSS Feed?
about how to keep track of the history if your users have a use case for going back in tie. in this case the only option would be for your client to keep a history and compare new .ics with the old one to display the most comprehensive history.
however if you also own the server / feed side you could decide of specific REST API to offer more flexibility to the client side (i.e. specify date range for the feed)

Related

check weather the user readed data or not in flutter using firestore

I was developing the chat app in flutter using firestore, the users successfully chat one-to-one. but I also want to send the notification to the user that someone sends him/her a message. For that I decided to use the cloud messaging service of firebase, but how can I check that the user read the message or not.
There is nothing built into Cloud Firestore to track which user has read a specific document already.
The two most common approaches that I know of are:
To track for each individual message and each individual user whether they have read it, so by keeping a list of the user IDs in each message document. While this potentially stores a lot of extra data, it is the most direct mapping of your use-case.
In most chat apps though, tracking of what messages each user has read is done as an "up to here". So if the user has read all messages up until a certain one or a certain time, the assumption is that they've also read all the messages before that one/moment.
For this model you can instead just keep a single document ID or timestamp for each user (i.e. readUpTo), instead of having to mark each message for each user that has read it. In your UI, you then determine whether to show each message as unread based on the message ID/timestamp compared to the timestamp of readUpTo.

One click url for importing webcal to google/outlook calendar

I have a php app that serve as a webcal server, I want user can choose either use their calendar app, or just import the webcal://example.ics directly to google or outlook or office 365 calendar with one click url, without user going through settings to import. Tried to find documents on these but couldn't.
YZY, There isn't a way that you can control the users calendar application to just import. It is up to the receiving end - the users application, to say how an ics file or url is treated on receipt. For example, in my desktop browser i have the default application for a .ics url/file set to be notepad++, not my calendar app. There is nothing you can do to override that.
How other applications such as email applications on smartphone or desktop treat it will depend on their settings as controlled by the user. EG: In outlook users may have unticked the 'automatically process meeting requests'
The only control the provider of the ics url/file has is to ensure that the file/url is specified correctly as per the latest specification (Note RFC5546 updates RFC5545, one needs to read both). Briefly:
https protocol is standard (webcal is unofficial apple. See https://icalendar.org/iCalendar-RFC-5545/1-introduction.html, https://en.wikipedia.org/wiki/ICalendar.)
The suffix is '.ics' as per examples given in RFC5546 and RFC5545
The mime content type is text/calendar https://www.iana.org/assignments/media-types/text/calendar and https://datatracker.ietf.org/doc/html/rfc5545#section-8.1
The appropriate METHOD must be used: PUBLISH is suitable for a subscribable URL (where it appears as a separate calendar in the URL) OR REQUEST (for meeting requests in emails etc) See https://datatracker.ietf.org/doc/html/rfc5545#section-3.7.2 and https://datatracker.ietf.org/doc/html/rfc5546#section-7.2
I like to distinguish between 'import' and 'subscribe':
Import in my opinion is where one imports an event (or multiple events) from a .ics file INTO an existing chosen calendar - eg (but not only): when a METHOD:REQUEST is used.
Subscribe is for icalendar feeds that get updated and so it is practical to subscribe or add the calendar by url to one's calendar application. This kind of url needs to be publicly accessible (although it can be obscured by unusual url)
One could download a subscribeable .ics and 'import' it but then one would only ever have that frozen event/s as at that point in time, it would not ever update.
In summary the best you can do is provide the url correctly and offer some links to info on how to subscribe in case the users are unfamiliar with subscribing

How to send DokuWiki notification mails at certain time?

In our DokuWiki Installation (Release 2018-04-22b "Greebo"), users can subscribe to daily notification mails, which is a core feature of DokuWiki.
For those daily emails, we would like to make sure that they arrive at a certain time.
In the documentation, I did not find anything about a script that could be started (i.e. from a cronjob) to send out mails.
I set up a cronjob calling a freely accesible page in the wiki using curl (no login required for this page). This did not cause emails to be send.
Any hint on how to schedule daily emails to be send at a certain time would be helpful!
Update: I am aware of .../feed.php, which would theoretically allow to get information on wiki events using the RSS feed. This data could be used to send notification mails. However, the RSS feed would need to be generated for every user to respect access right. For this to work, some sort of user credentials - or a copy of the user's access rights - would need to be copied to a place outside of dokuwiki and kept in sync.

Building something like TweetDeck - is it realistic to store all the tweets?

I'm creating an app for Q&A that unifies twitter mentions/DMs, facebook wall posts/messages, as well as email and sms into one inbox. I know how I'm going to handle the SMS (storing each incoming message and outgoing response), but I'm wondering if it's realistic to apply the same methodology to twitter/facebook messages.
I figure I need to store them so I can at least mark them read/unread. Is this how TweetDeck does it? I can't imagine them polling the API constantly without caching anything.
By the way if you know of an app that does this already that would be fantastic. Hootsuite does everything but SMS and email oddly.
Assuming you're building a mobile app (since you mention SMS), if you're aiming to support arbitrary Facebook & Twitter accounts (ie including very busy ones) & use over a long period of time, then you can't store all the tweets & posts on the mobile device: this storage required would grow over time to exceed the capacity of any device.
You can store a reasonable number of "recent" tweets/posts in full; these form the backing model for your UI's views. When the user navigates past either end you can retrieve more via the APIs, and you'll perform housekeeping on this collection so it doesn't get too big, discarding older ones as necessary.
(This collection may end up being gappy: eg if I haven't run the app for a week, when I start it it would retrieve the most recent day's content, leaving a gap between yesterday's content & that of a week ago. Twitter's apps do this & show the gaps, allowing the user to fill them in via the APIs.)
If you need to keep track of read/unread status, you could store this & the unique id for a larger number of items; but again, you'll eventually need to purge these too.
You might want to look at the Twitter User Streams feature; Facebook's Realtime Updates isn't as well-suited for mobile apps (unless backed by your own server).

Auto-delete after a certain date

I'm looking to use Soundcloud to promote some upcoming events - I'll have a separate sound file promoting each event. I'd like the soundfiles to auto-delete once the events have happened. Is there a way of setting a Kill Date field so that after a certain date, the sound file will delete.
You could certainly use the API to delete these tracks using whatever logic you need, but there's no feature built-in to SoundCloud to do this automatically.
Here is the documentation for the API: http://developers.soundcloud.com/docs/api/reference#tracks
You'd have to be authenticated (obviously), and then send a DELETE request to /tracks/{id}