Skip to content

Import schedules any school website to any calendar (in theory).

License

Notifications You must be signed in to change notification settings

TurboHsu/schedular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schedular

Its a python script to import schedules from school website to any calendar (in theory).

Installation

Simply run the following command to install all the dependencies.

pipenv sync

Usage

Just check out the example.

Providers documentation

Source

NUIST academic system

To create a instance, do this:

from provider.source.nuist import NUISTSourceProvider
from datetime import datetime

source_provider = NUISTSourceProvider(
    username="", # Your student ID
    password="", # Your password
    first_school_day=datetime(2024, 9, 2), # The first day of the semester
    semester="2024-2025-1", # The semester, in the format of "year-year-semester"
    headless=True) # Set to false if u wanna see stuff happen

Call source_provider.get_courses() to get the courses.

Destination

Google calendar

If you don't own an OAuth client secret file, pls check out https://developers.google.com/calendar/api/quickstart/python#set_up_your_environment to get one.

Put it in /cache/google_credentials.json or any other path you like.

To create a instance, do this:

from provider.destination.google import GoogleDestinationProvider

destination_provider = GoogleDestinationProvider(
        calendar_id='[email protected]') # Your calendar id, defaults to primary

Call destination_provider.set_courses(courses) to set the courses.

About

Import schedules any school website to any calendar (in theory).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages