Generates Google Calendar events and/or Google Sheet gradebooks for all your classes.
Clone or download
s2t2 Release (#12)
Prepares this library to be released to RubyGems.
Latest commit 24ec4de Dec 24, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
auth Release (#12) Dec 24, 2018
bin Setup and document repo Oct 6, 2018
lib Release (#12) Dec 24, 2018
pages Setup and document repo Oct 6, 2018
spec Release (#12) Dec 24, 2018
.codeclimate.yml Calendar Events (#5) Dec 7, 2018
.gitignore Sheets (#11) Dec 23, 2018
.rspec Generate new gem Oct 6, 2018
.ruby_version Calendar Events (#5) Dec 7, 2018
.travis.yml Calendar Events (#5) Dec 7, 2018
CONTRIBUTING.md Release (#12) Dec 24, 2018
CREDITS.md Release (#12) Dec 24, 2018
Gemfile Generate new gem Oct 6, 2018
Gemfile.lock Release (#12) Dec 24, 2018
LICENSE.md Calendar Events (#5) Dec 7, 2018
README.md Release (#12) Dec 24, 2018
Rakefile Tasks (#4) Oct 7, 2018
my_banner.gemspec Release (#12) Dec 24, 2018

README.md

MyBanner - Ruby

Build Status Maintainability Test Coverage

This program processes detailed schedule information from your school's Ellucian Banner information system to generate Google Calendar events and/or Google Sheets gradebook files for each of your scheduled classes.

Dependencies

This program requires Ruby (version 2.5) and Bundler (version 1.16).

Installation

To install the program, download or clone it from GitHub:

git clone git@github.com:prof-rossetti/my-banner-rb.git

All subsequent usage commands assume you will be running them from the root directory of this repository, so navigate there now:

cd my-banner-rb/

Setup

Install the program's Ruby package dependencies by running the setup script:

bin/setup

Usage

Before the program can generate Google Calendar events and/or Google Sheet gradebook files for all your scheduled classes, it needs access to your schedule. So follow the section below to Download Schedule Page from Banner before performing any of the other functionality.

Downloading Schedule Page from Banner

To access your schedule of classes for some specified term, login to your school's banner site (e.g. https://myaccess.georgetown.edu/), and navigate to one of the following schedule pages, depending on your role:

  • Home > Faculty Services > Faculty Detail Schedule
  • Home > Student Services > Student Detail Schedule

Download your schedule page as an HTML file and move it into this repo at: pages/my-detail-schedule.html.

To check the program's ability to parse that HTML content, run the schedule parser script and inspect its results:

bundle exec rake parse_schedule

Example results:

{
  :title=>"Intro to Programming",
  :crn=>123456,
  :course=>"INFO 101",
  :section=>20,
  :status=>"OPEN",
  :registration=>"May 01, 2018 - Nov 02, 2018",
  :college=>"School of Business and Technology",
  :department=>"Information Systems",
  :part_of_term=>"C04",
  :credits=>1.5,
  :levels=>["Graduate", "Juris Doctor", "Undergraduate"],
  :campus=>"Main Campus",
  :override=>"No",
  :enrollment_counts=>{:maximum=>50, :actual=>45, :remaining=>5},
  :scheduled_meeting_times=>{
    :type=>"Lecture",
    :time=>"11:00 am - 12:20 pm",
    :days=>"TR",
    :where=>"Science Building 111",
    :date_range=>"Oct 29, 2018 - Dec 18, 2018",
    :schedule_type=>"Lecture",
    :instructors=>["Polly Professor"]
  }
}

As long as your schedule data resembles the structure above and reflects the contents of your schedule page, you are ready to use this program to Generate Google Calendar Events and/or Generate Google Sheet Gradebook Files.

Generating Google Calendar Events

For the program to issue requests to the Google Calendar API, it needs the credentials of a Google APIs client application that has access to the Google Calendar API. From the Google Calendar API quickstart guide, click "Enable the Calendar API" and follow the instructions to create a new app and generate new credentials. Download the resulting credentials file and move it into this repo at: auth/calendar_credentials.json.

Once the schedule page and calendar credentials are in place, you can create google calendars and events for your scheduled classes by running the calendar creation script:

bundle exec rake create_calendars

NOTE: When running this command for the first time, you will be prompted to login to Google to get an authorization code. After supplying that code to this program, the program will store an access token which will be used to authorize subsequent requests on your behalf, so you don't need to login again.

Generating Google Sheet Gradebook Files

For the program to manage your gradebook files, it needs access to both the Google Sheets and Google Drive APIs.

For the program to issue requests to the Google Sheets API, it needs the credentials of a Google APIs client application that has access to the Google Sheets API. From the Google Sheets API quickstart guide, click "Enable the Sheets API" and follow the instructions to create a new app or select an existing one, and generate new credentials. Download the resulting credentials file and move it into this repo at: auth/spreadsheet_credentials.json.

For the program to issue requests to the Google Drive API, it needs the credentials of a Google APIs client application that has access to the Google Drive API. From the Google Drive API quickstart guide, click "Enable the Drive API" and follow the instructions to create a new app or select an existing one, and generate new credentials. Download the resulting credentials file and move it into this repo at: auth/drive_credentials.json.

Once the schedule page, spreadsheet credentials, and drive credentials are in place, you can create google sheet gradebooks for your scheduled classes by running the spreadsheet creation script:

bundle exec rake create_spreadsheets

NOTE: When running this command for the first time, you will be prompted to login to Google to get an authorization codes for both the sheets and drive apis, respectively. After supplying each code to this program, the program will store an access token which will be used to authorize subsequent requests on your behalf, so you don't need to login again.

Contributing

License