Skip to content

saloniig/Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Script

It'a a python script that converts xml file of teachers generated by FET software to .ics format that can be further used in import in Google Calendar.

Now let's understand this:

  1. First of all we have import necessary libraries then we have input a xml file that contains timetable of teacher.
  2. After that data is read using for loop and we have open a .ics file whose name will be stored with teachers name. As we are generating different file for different teachers.
  3. Then we have write begin tag BEGIN:VCALENDAR to start file then time is split using regular expression.
  4. The start and end time is written in the file according to the format accepted by ics format.Actually the input time(starting and ending of lecture) was according to Indian time zone but by default icalendar pick time according to UTC hence we have added TZID=Asia/Kolkata.
  5. Next step we have written a day in the file.
  6. As the last step location has been written i.e Room no. and summary of teacher's lecture(contains subject name, activity name i.e. lecture or tutorial or lab, class name) is written in ics file.
  7. If the location is not specified i.e that field is empty then else condition will be used otherwise we will get an error.
  8. After that end tag has been written in ics file END:VCALENDAR.

IMPORTING GOOGLE CALENDAR

  1. Open Google Calendar on a computer. Note: You can only import from a computer, not a phone or tablet.
  2. In the top right, click the Gear icon and select "Settings".
  3. Click on the "Import and Export" from left hand side.
  4. Click "Choose File" and select the file you exported. The file should end in .ICS or .CSV.
  5. Choose which calendar to add the imported events to. By default, events will be imported into your primary calendar.
  6. Click "Import".

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages