This is a package that allows you to automatically upload your gradescope assigments, due dates, grades, and more to a notion database.
Requires: Python >= 3.6; Packages: [bs4 (BeautifulSoup), requests]. Install with pip install -r requirements.txt
You can either set enviorment variables in your system or through a secrets.json file (example file provided) for the following variables:
First, you need to get your notion API key. To do this, go to Notion.so and log in. Then, go to this page and click "New Integration". Then, click "Copy Token" and paste it into the NOTION_API_KEY
environment variable.
Then, you need to link a database to the integration, and get the database ID. To do this, go to the database you want to link, and click "Share" in the top right. Then, click "Copy Link". Use the part of the link after '/' and before '?' as the NOTION_DB_ID
environment variable.
Set the GS_USERNAME
and GS_PASSWORD
environment variables to your gradescope username and password.
To run the program, run python script.py
in the root directory of the project.
Instantiate the class with the following parameters:
api_key
: The API key for your notion integrationdb_id
: The ID of the database you want to link to
To change the schema and how the data is stored, change the schema.json file according to Notion API documentation. Then, Notion.update_schema() sends a PATCH request to the API to update the schema. To change the data parsing, change the row object formatter in notion/utils.py.
- Existing assignment detection
- URL hyperlinking
- Dockerize
- Add support for multiple databases
- Automatic database creation
- Relation support for 'course id'