TypeScript (NodeJS) app to generate Timetable in ICal format.
- Install NodeJS from here.
- Clone this repository
$ git clone https://github.com/prateekkumarweb/timetableiith.git
- Install the required packages
$ yarn install
- Edit the files
config.yaml
file. An example is given inconfig
folder. - Generate JS files
$ yarn build
- Run the program
$ cd dist $ node index.js -c config.yaml -o filename.ics
The generated ICal file can be imported into Google Calendar or Microsoft Outlook. Instead of importing you can also host this file and keep Google Calendar or Microsoft Outlook in sync with it.
- Fork this repository, make required changes and host the site using github pages.
- Next, in Google Calendar, click the + button below the overview month calendar and select From URL.
- Enter the URL of the hosted ics file and add the calendar.
- This will update the calendar whenever a change is made by pushing changes to the repository.
- Note that it may take upto 24 hours for Google Calendar to update the events from the hosted iCal file.
- Create a new file at
.git/hooks/pre-commit
with following content.#!/bin/sh yarn build cd dist node index.js -c ../config/config.yaml -o ../out/tt.ics git add tt.ics
- Change persimissions of the hook file.
$ chmod +x .git/hooks/pre-commit
- After you commit,
tt.ics
will be auto generated and added to git.
Copyright © 2017-2019 Prateek Kumar