Skip to main content

view available classes for the University of South Carolina

Project description

# USC-scraping
[![Build Status](https://travis-ci.org/jyn514/GradeForge.svg?branch=dev)](https://travis-ci.org/jyn514/GradeForge)

[my.sc.edu](https://ssb.onecarolina.sc.edu/BANP/bwskfcls.P_GetCrse) has an
absolutely terrible web interface. This is a repository to download courses for
viewing offline. Support is available for an SQL database. Work on a web
interface is [ongoing](https://github.com/jyn514/GradeForge/tree/frontend).

## Requirements
- GNU `make` (`gmake` for BSD users)
- `python3`
- `pip` and modules from `requirements.txt`. if not using a packaged version of `lxml`, you will need
- a working C compiler
- the `python-dev` library
- `libxml2-dev`
- `libxslt-dev`
- [`pdftotext`](https://poppler.freedesktop.org/) (part of `poppler-utils`)
- [`chromedriver`](http://chromedriver.chromium.org/)
- [`tidy`](http://www.html-tidy.org/)

## Goals
### Long-Term
- have all the information needed or useful to register on one page. this includes
- RateMyProfessor
- past grade distributions
- schedule planner or an equivalent
- degreeworks
- required textbooks

### Short-Term
- parse_bookstore has yet to be implemented either in the makefile or in `parse sections`
- all the `parse` functions should take a boolean `create`
- if true, assert the output file does not exist
- if false, don't write headers
- the submit button for `index.html` is broken
- add rules in the makefile for courses in past years.

### Non-Goals
- registering automatically. this would require storing the *university*
usernames and passwords of anyone who used the service. this is acceptable
for personal use (and feel free to do this, `login.py` is file you're looking
for), but absolutely unacceptable for other users.


## Usage
- SQL database: `make`
- Web server: `make web` or `make server`
- Dump of everything: `make dump`
- Unit tests (the few we have): `make test`

## Development
### Setting up
1. `git clone https://github.com/jyn514/gradeforge` && cd gradeforge
2. ln -s ../../scripts/pre-commit .git/hooks
3. (optional) run `make data` to pre-populate the HTML

### Bugs
- `parse_section` does not parse days met properly if the times are different
on different days. run `make` on branch `broken` for an example.
- course['attributes'] is a tuple on `broken`; this crashes `create_sql.py`

### Notes
- please do not try to use gradeforge directly for parsing,
the dependencies will drive you mad. use the beautiful makefile instead.
- data for grades is available back until 2008, but data for sections is only available until 2013.
- columns in grades ending in `_GF` stand for 'Grade Forgiveness'
- png_for won't work for this semester (because the grades haven't been published).
this sounds stupid but I was wracking my brains trying to figure out why it was broken.

### Types
- semester: a date in YYYYMM format, where MM is one of 01, 05, 08 and YYYY >= 2008; for example, 201608
- department: a department name which matches the regex [A-Z]{4}; for example, CSCE
- code: a class name which matches the regex [A-Z]?[0-9]{3}; for example, 145
- section: a section identifier which identifies an instance of a class; for example 001
- uid: a section identifier which is unique within a semester; matches the regex [0-9]{5}. for example, 84495

## Relevant Links
### Search Pages
- [Bookstore](http://sc.bncollege.com/webapp/wcs/stores/servlet/TBWizardView?catalogId=10001&langId=-1&storeId=10052)
- [Sections](https://ssb.onecarolina.sc.edu/BANP/bwckschd.p_disp_dyn_sched)
- [Sign up for sections](https://ssb.onecarolina.sc.edu/BANP/bwskfreg.P_AltPin)

### Result Examples
- [Catalog](https://ssb.onecarolina.sc.edu/BANP/bwckctlg.p_disp_course_detail?cat_term_in=201808&subj_code_in=BADM&crse_numb_in=B210)
- [Bulletin](http://bulletin.sc.edu/preview_course.php?catoid=70&coid=85439)
- [Section](https://ssb.onecarolina.sc.edu/BANP/bwckschd.p_disp_detail_sched?term_in=201808&crn_in=12566)
- [Exams](https://www.sc.edu/about/offices_and_divisions/registrar/final_exams/final-exams-spring-2018.php)

### External Links
- [Login](https://cas.auth.sc.edu/cas/login)
- [Semester starts and ends](https://my.sc.edu/codes/partofterms/list)
- [RateMyProfessor](https://www.ratemyprofessors.com/search.jsp?queryBy=schoolId&schoolID=1309)
- [Schedule Planner](https://sc.collegescheduler.com/entry)
- [Grade Spreads](https://www.sc.edu/about/offices_and_divisions/registrar/toolbox/grade_processing/grade_spreads/index.php)
- [Grade Abbreviations](https://www.sc.edu/about/offices_and_divisions/registrar/transcripts_and_records/grade_point_scale/index.php)


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradeforge-0.0.1.tar.gz (7.0 MB view details)

Uploaded Source

Built Distributions

gradeforge-0.0.1-py3.6.egg (7.1 MB view details)

Uploaded Source

gradeforge-0.0.1-py3-none-any.whl (7.1 MB view details)

Uploaded Python 3

File details

Details for the file gradeforge-0.0.1.tar.gz.

File metadata

  • Download URL: gradeforge-0.0.1.tar.gz
  • Upload date:
  • Size: 7.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for gradeforge-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1799c45373b68c51e18ebc815ec045615bf4f037786309a5cce438432b54333b
MD5 a994325191c17c7c2410532ee72b1e0b
BLAKE2b-256 ff9204e0fac6009094bd6829cdeea3eedc9ccbf2820d900655d68084a0a6727b

See more details on using hashes here.

File details

Details for the file gradeforge-0.0.1-py3.6.egg.

File metadata

  • Download URL: gradeforge-0.0.1-py3.6.egg
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for gradeforge-0.0.1-py3.6.egg
Algorithm Hash digest
SHA256 a76aff90a371111e257266d982bd342bcec6826a70fe0aaaec66844f5a5a76d1
MD5 293575aee7e99af39222679f990ec154
BLAKE2b-256 54d80d4fc6c4a3c263e53cba0368faa9d0df9b75673b283724b365565c05a639

See more details on using hashes here.

File details

Details for the file gradeforge-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gradeforge-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for gradeforge-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b9d65acb4ad6eadf7d5f5c8d4c310edca29694b7495d12269d30eac858a4e1a
MD5 4152a8470990d775639c6b6fad9a3d46
BLAKE2b-256 22f4d80d015c6d8434fd215c4acb249be7794dc5b905c757032117317e3b4ceb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page