Lasso9 iCal

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso9 iCal

Steven McIntosh
I’ve had a system in place for Lasso 8.6 to comb through a client’s entire collection of exchange calendars for all of their resources (meeting rooms in this case) and compiles them into one calendar that their employees subscribe to or can view from their intranet portal (instead of each employee subscribing to over 30 calendars). Now that we are moving everything to Lasso 9, this is presenting a problem since there seem to no longer be any ical tags in Lasso and none available in TagSwap.

Does anyone have any suggestions? Does anyone have any lasso 9 code they could share?

Thanks for any information.
Steven McIntosh

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 iCal

Jolle Carlestam-2
23 jul 2014 kl. 14:54 skrev Steven McIntosh <[hidden email]>:

> I’ve had a system in place for Lasso 8.6 to comb through a client’s entire collection of exchange calendars for all of their resources (meeting rooms in this case) and compiles them into one calendar that their employees subscribe to or can view from their intranet portal (instead of each employee subscribing to over 30 calendars). Now that we are moving everything to Lasso 9, this is presenting a problem since there seem to no longer be any ical tags in Lasso and none available in TagSwap.
>
> Does anyone have any suggestions? Does anyone have any lasso 9 code they could share?

I’ve actually just completed a calendar solution for intranet usage that has a number of the features I understand you’re looking for. All in Lasso 9.
Calendars can be exported as Icalendar files or subscribed to from Outlook, Apple Calendar, Google Calendar etc. Nothing packaged for general distribution as of yet though.

But contact me off list for further discussions.

HDB
Jolle
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 iCal

Jolle Carlestam-2
23 jul 2014 kl. 16:02 skrev Jolle Carlestam <[hidden email]>:

> But contact me off list for further discussions.

I’ve been contacted by several persons expressing an interest in how our calendar solution in regards to letting Apples Calendar, Outlook, Google Calendar etc works.

Putting the answer here instead of direct replies to let more people benefit from it.

Basically what I have is a set of methods that will create valid Icalendar files. An Ical file is a plain text file with calendar data structured according to specific rules. To work out how to handle those rules I spent a lot of time here: http://www.kanzaki.com/docs/ical/
Also used this to validate my efforts:
http://severinghaus.org/projects/icv/

Here’s an example of a genuine export with only one event:
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
METHOD:PUBLISH
PRODID:-//Kulturfaktorn//Demo//Lasso Mac OS X 9.2//SV
BEGIN:VTIMEZONE
TZID:Europe/Stockholm
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
DTSTART:19810329T020000
TZNAME:CEST
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
DTSTART:19961027T030000
TZNAME:CET
TZOFFSETTO:+0100
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20140723T175944Z
LAST-MODIFIED:20140723T175944Z
UID:2446DE66-7480-4E1E-BA05-76B5D33E6371
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=3
DTEND;TZID=Europe/Stockholm:20140723T210000
TRANSP:OPAQUE
SUMMARY:Write email to explain Icalendar exports
DTSTART;TZID=Europe/Stockholm:20140723T200000
DTSTAMP:20140723T155948Z
LOCATION:Stenegård
SEQUENCE:0
DESCRIPTION:Send it to the list to let more people enjoy it.
END:VEVENT
END:VCALENDAR

To have multiple events it is basically only to repeat the section between the BEGIN:VEVENT and END:VEVENT.
And interesting tidbit is that the above event will repeat itself three days in a row. As stipulated on the row RRULE. As I have it, it can be repeated daily, weekly, monthly or yearly. Forever, a given number of occasions or ending after a specified date. The icalender specification has a lot more potential than that but I have yet to implement support for it.

Now, export this data is simple, produce a text file with the icalendar data and have Lasso 9 send it as a file. This text file can then be opened by your calendar app and all events in it will be placed in your calendar.
Letting other calendar solutions subscribe to it is almost as simple. Produce a URL that when called trigger an export as above and place that URL wherever your calendar app asks for it in the apps subscribe settings. Apples Calendar and Outlook both support password protected calendars. Google Calendar doesn’t so there’re reasons to be a bit more careful with what you supply to them. Also be aware of that Google’s only purpose to provide a calendar solution is to be able to mine your data. Even with a non password protected calendar they still refuse to treat it if your robots.txt file prohibits search bot crawling. Thus, in my view, you should only send calendar information to Google that you have an interest in being public. Not any kind of internal events.

For apps that support password protection I have Lasso create URLs that look like this:
http://domain.tld/api/cal/AaSDDMiXEMhCsdWyflk_Hl_NzkCX0v8e3pX6w2EaK4apV6RuDda0B9hB3jJWSsNg
The last part of the above URL is an obscured GUID that acts as an ID for a publish record. That record also keep track of the username expected and the password that goes with it. And some other data in regards to what calendars to publish etc. The /api/cal/ directory is protected by Apache rules. I have Lasso create and edit the user/password file Apache looks for.

When hit Lasso first checks the provided credentials. If they match the publish record it continues with grabbing the calendar data. The auth details are grabbed like this by the way:
local(
        auth_details = client_authorization,
        authed_user = #auth_details -> find('username'),
        authed_passw = #auth_details -> find('password'),
)


More to keep track of. An exported calendar file that is opened in your calendar app will create editable events in your app. But there is no link back to the server. Any edits are local only. And any edits on the server data will not be available in your local app until you do a new export. Subscribed calendars are readonly in your calendar app. But, any changes done on the server will be reflected in your local app automatically.

More could be said about this. Maybe this should be one of my topics on LDC in october…

HDB
Jolle
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>