-2

My college has an online JavaServer Pages calendar with courses schedule that can change very often. It doesn't allow the export of the schedule in calendar format and access is protected by password and login (I have them).

I want to import this calendar into my Google's one or at least retrieve the courses schedule data from the server. Simply adding the URL won't work as the target is a JPS file nor using a webot. Since my browser is able to display the schedule data, it means that they are available to me.

So is there any web application to retrieve them?

Any web application technology I can use to achieve this?

1
  • Unless the calendar app your school is using offers up some sort of standardized standardized data export, you're looking at a customized solution. That's outside the ken of this site.
    – ale
    Jan 9, 2014 at 0:54

1 Answer 1

1

You should be able to use the Google Calendar API (see https://developers.google.com/apps-script/reference/calendar/) to do this.

In a Google Script project, you can do this:

var calendar = CalendarApp.getCalendarsByName("Target Google Calendar's Name")[0];
calendar.createEvent('Title', startTime, endTime);

If you need to delete existing entries, you can do:

var events = calendar.getEvents(fromDate, toDate);
for(var i=0; i<events.length;i++){
  var ev = events[i];
  ev.deleteEvent();
}

The task you would still need to solve is to let your Google Script access the source calendar, but that should not be too hard, using the UrlFetch API (https://developers.google.com/apps-script/reference/url-fetch/).

Not the answer you're looking for? Browse other questions tagged or ask your own question.