Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

here's the problem: my college has an online JSP calendar with courses schedule that can change very often. it doesn't allowed to export the schedule in calendar format. And The access is protected by password and login (i have them). Now what I want to do is to import this calendar into my google's one or at leat to retrieve these course 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 ?

thanks

share|improve this question
    
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. –  Al E. Jan 9 at 0:54
add comment

1 Answer

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/).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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