项目作者: PostsDesert

项目描述 :
Schoology iOS Reminders Integration
高级语言: Python
项目地址: git://github.com/PostsDesert/SiRI.git
创建时间: 2017-04-08T00:32:27Z
项目社区:https://github.com/PostsDesert/SiRI

开源协议:GNU General Public License v3.0

下载


S.i.R.I. - Schoology iOS Reminders Integration


A simple script that fetches your schoology events and upcoming assignments and adds them to ios reminders with a alarms and short link.

Setup

🚨 I’m waiting on a PR from here to merge, which contains some necessary features. Until then you can install this using my fork as described in the setup instructions. 🚨

First things first, clone this repository to your server:

$ git clone https://github.com/PostsDesert/SiRI.git

Next download a fork of pyicloud…

$ git clone https://github.com/PostsDesert/pyicloud.git

…and install it using

$ python3 setup.py install --user

Now make sure you have Python 3 installed and cd in and install the dependencies, you ideally want to do this within a virtualenv if you have it installed, but otherwise you can omit those steps and just run the pip3 install line.

  1. # Run this if you have virtualenv installed:
  2. $ virtualenv .venv
  3. $ source .venv/bin/activate
  1. # Continue on if you have virtualenv or start here if you don't:
  2. $ pip3 install -r requirements.txt

Once the requirements are installed we’ll need to edit the config.py file, thats used to store our credentials and configuration options. Here’s an example:

  1. # Apple credentials
  2. icloud_email = 'postsdesert@github.com'
  3. icloud_password = 'password'
  4. # Schoology API Key
  5. schoology_app_key = '32hj4fhkvdieb49hnfoh4oh4'
  6. schoology_app_secret = '38fh3ofhtoh5oghdo3hfwj49hjg94h'
  7. # Google link Shortener API Key
  8. goo_shorten_url_key = '3j49jgl58igjl9vjdvhd9h5493hf9ekt9h394he9tk4'
  9. # Collection/List that you want your Schoology events to get sent to
  10. collection = 'Schoology'

How to get the keys

  1. Generate an Schoology Api Key. Copy the consumer key to schoology_app_key and consumer secret to schoology_app_secret.
  2. Copy your iCloud username and password to their respective fields (icloud_email and icloud_password).
  3. (optional) Generate an api key for Google link Shortener and paste in in for goo_shorten_url_key.

Set up a Crontab (optional)

  1. Log into your linux account
  2. Run crontab -e
  3. paste this snipped of code on a line and save the file 30 4 * * * python3 30 4 * * * python3 ~/SiRI/SiRI/SiRI.py >> ~/SiRI/SiRI/SiRI.log 2>&1y. This will run the program at 4:30pm every day.