Get Your Freaking Timetable
NOTE: All updates to this repo should reflect, with appropriate refactorisation, in gyft-serve
Gets your timetable from ERP and adds it to your Google Calendar or gives you an ICS file which you can add in any common calendar application.
Note: Please use this utility with python version 3.6.
Check your python version using the command py --version
The following procedure is to be followed each new semester by the maintainer for updating GYFT to work properly.
(YYYY, MM, DD, HH, MM)
.Step 1: Get your timetable from ERP:
Run the Gyft script locally (using Python)
Clone this repository and run the following command:
$ pip install -r requirements.txt
$ python3 gyft.py --user <ROLL_NUMBER>
Enter your password and security answer when prompted.
Your timetable will be saved in data.txt
. Make any changes required in data.txt
. Then, proceed to Step 2.
Use the web application on any browser
Source at nishnik/gyft-serve.
Step 2: Decide whether you want to add the events to Google Calendar or generate an ICS file from the data.
Adding to Google Calendar requires an Internet connection
ICS files are compatible with almost all Calendar applications (including the iOS calendar application, Sunrise etc)
Step 2(a): If you decide on adding your events to your Google Calendar:
Step (i): Get your credentials.json
and save it as client_secret.json
to the current directory by
following the Step 1 from
here.
Step (ii): Now, run:
$ python add_events.py
MISC: To delete all the recurring events added by the CLI or GYFT Web Application (uses property of recurrence to identify events to delete):
$ python del_events.py
Step 2(b): If you decide on generating an ICS file:
Step (i): Run the command:
$ python3 generate_ics.py
# you can provide input and output file path to this python script
$ python3 generate_ics.py --input d.txt --output t.ics
Step (ii): Open your calendar application and import this ICS file into it.
For google calendar, follow the instructions given here.
If you manually edit the subjects.json
file, re-indent and pretty print the
file using this command: (you will need
jq)
jq -S --indent 4 . subjects.json
GPLv3.
Please read CONTRIBUTING.md guide to know more.