目录

Gradescope iCalendar Integration

All credit goes to @tanjeffreyz for developing the web scraping service and most of the README. Also, @zyonse has a similar program that you can find here. I don’t know if it works.

Because some online homework platforms such as Gradescope don’t have an API for students (boo👎), web scraping is required to retrieve information about assignments. HTTP requests are used alongside Beautiful Soup to perform this web scraping, which is automatically executed every 6 hours (starting at 12am EST) using GitHub Actions. This time can be edited by changing the cron value in main.yml. This will create an ics file which you can add to any major calendar service. The program will not add any completed assignments, as well as any assignments older than 180 days. Let me know if you want to be able to change this value.

One-time Setup Instructions

  1. Log into GitHub or create a new GitHub account if you don’t have one.

  2. Click at the top of this page, which should open the following prompt.

  3. Enter a name for the new repository. You will need to set it to public. This is the only way that your calendar can access the data. All calendar links are public and work this way. Then, click Create Repository.

  4. Visit your new repository’s secrets at the following link:

    https://github.com/YOUR_USERNAME/REPOSITORY_NAME/settings/secrets/actions

Configuration

  1. For each homework platform you use, create two new GitHub secrets: one for your username and one for your password. A new secret can be created by clicking . For each secret’s “Name” field, you must only use the values listed below. In the “Secret” field, enter either your username or password depending on the value you chose for the “Name” field.
UsernamePassword
GRADESCOPE_USERGRADESCOPE_PASSWORD
  1. Now, go to the following link:
https://github.com/YOUR_USERNAME/REPOSITORY_NAME/settings/actions
  1. Under “Workflow Permissions”, make sure that “Read and write permissions” is enabled:

Starting the program

Using the file navigation in your repository’s home page, go to data/assignments.json, delete the file, and click . This will force the program to regenerate your calendar.

This only needs to be done once, then the program should automatically update.

Adding the assignments to your calendar

There are 3 different ways you can add this to your calendar.

Option 1: Manual

The file is located at data/assignments.ics. Simply download it and import it to your calendar. This will not automatically update. However, if you do use this option, you can set the repository to be private.

Option 2: URL

The file is located at data/assignments.ics. On the top right, click the raw buttom. This will open the raw data. Then you can paste this url into the “import from URL” option in your calendar.

Option 3: URL with forced refresh (Google Calendar Only)

Google calendar can refresh slowly sometimes, but if you want to force it to refresh at a different rate you can use this script: https://script.google.com/home/projects/1BOk8MDLbLaHh6SwG1M1tsgNXjkcC-79LE0QoipRuTDxbO3fMVvqoROQD/edit

That’s it!

Your calendar should retreive the gradescope assignments and automatically add them to your calendar.

关于
6.4 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号