RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Auto .ics import from local server directory
Posted:  07 Oct 2011 01:40
Hello - very nice script!

I see that the option is available to import .ics files from the admin section - which works great.

I am trying to find a way to auto import files (.ie running a cron job..etc) every x minutes. Is there a way to accomplish this?

Thanks!
Posted:  07 Oct 2011 10:23
Hello there,
To auto import .ics files would require some programming. The part to read an .ics file and to parse and validate the iCal events could be taken from the current importICS.php script. The part to reject invalid iCal events and to directly insert valid events in the LuxCal database would be new.
Roel
Posted:  13 Nov 2012 20:44
Hi Roel,

is this feature available in the current version?
It would be very nice. We use SOGo (www.sogo.nu) and a special user
manages the general calender which is exported as ics via cron-job to a local directory.
SOGo and LuxCal are on the same server.

Thanks for any hints.
Bye
Holger
Posted:  13 Nov 2012 23:35
Hi Holger,
Unfortunately an auto-import function for iCal files is not available yet. As explained in my previous post above, it's probably not too difficult to implement. However, as far as I know it's not possible to automatically copy/share files between different domains. This makes the automatic import function (probably) rather useless. Unless SOGo bridges the gap and can store iCal files in a directory of the LuxCal calendar. I don't know SOGo well enough, but maybe you can answer this question.
Cheers,
Roel
Posted:  21 Nov 2012 13:43
Hi Roel,

SOGo calenders can be accessed via WebDav so a cron-job with:
     curl -u username:pass http://sogoserver/SOGo/dav/username/Calendar/personal.ics
can store the "personal.ics" everywhere you like.
Same for other calenders.

In my case I'll have several ics-files "personal.ics", "external.ics", "internal.ics", ...

At the moment I'll have no time to view at the source to start the implementation, so it would be
good if you (or other developers) could realize it.

Cheers,
Holger
Posted:  22 Nov 2012 00:09   Last Edited By: Roel B.
Hi Holger,
Ok, great. So what you are looking for is a script which can be run daily via a cron job and which produces an .ics file with all changes of the last 24 hours? So I guess that means the added event, the changed events and the deleted events.
I'll have to sleep on this (probably more than one night).
Cheers,
Roel
Posted:  22 Nov 2012 09:47   Last Edited By: Roel B.
Hi Roel,

Quote:


So what you are looking for is a script which can be run daily via a cron job and which produces an .ics file with all changes


no, I get all necessary ics-files from SOGo. I grab them via curl every day (or every hour) via a cron-skript and save
them in a local directory which would be accessible for LuxCal.

What I need is a console/commandline interface for LuxCal to import these ics-files, perhaps in the following way:

      import_ics_cron.php ID=<CATEGORY_ID> <ICS-FILE>

Then a call could be e.g.
    import_ics_cron.php ID=2 holidays.ics
    import_ics_cron.php ID=3 internal_events.ics
   ...

Every time all events in the ics-file should be imported and "overwrite" is true for all events.

Thanks and sleep well wink
Cheers,
Holger
Posted:  16 Aug 2013 08:04
Hi Roel,

with starting a new school year I want to update our LuxCal-Version.
What is the actual state of auto importing ics-files?

We (i.e. our teachers) are working with SOGo (sogo.nu) and it is possible to
export calenders via curl (http-requests) from SOGo.

Thanks for any newser wink hints.
Bye
Holger
Posted:  22 Jul 2014 10:56
Hi Roel,

are there any new informations, i.e. functions, to import local stored ics-files via script?
Perhaps in the upcoming LuxCal-version?

Bye
Holger