<commit_before># SourceGrade

[SourceGrade](http://www.sourcegrade.xyz/) is a web scraping app built with MongoDB, Express.js, Node.js, React, and Redux for [GradeSource](http://www.gradesource.com/). SourceGrade is designed to make your life easier by finding all your scores for a particular class on GradeSource, and presenting all the data in a meaningful and elegant way. It also allows you to create accounts to save all your information for a class so that you never have to remember your secret number or course url again!

## Usage

1) Add your class url [here](http://www.sourcegrade.xyz/add) if it hasn't already been previously added.

2) Enter your Secret Number and Class in the input fields

![enter info](https://github.com/joelseq/SourceGrade/blob/master/img/image1.png)

3) View your scores and statistics for each assessment or category.

![view scores](https://github.com/joelseq/SourceGrade/blob/master/img/image2.png)

![view scores 2](https://github.com/joelseq/SourceGrade/blob/master/img/image3.png)

In addition, if you want to use the API directly the route is:

`http://www.sourcegrade.xyz/api/scrape?id={secret number}&url={class url}`

Example API Request:

`http://www.sourcegrade.xyz/api/scrape?id=8010&url=http://www.gradesource.com/demo/example1/index.html`

## Install and run locally

To install and run this on your local machine you need [MongoDB](https://www.mongodb.com/)

1. Clone this repository
2. Run `npm install`
3. Start MongoDB
4. Create a `.env` file in the main directory, providing the two environment variables DB_URI (url to your MongoDB server) and SECRET (secret for encrypting JSONWebTokens).
Example:
```
DB_URI=mongodb://localhost:27017/sourcegrade
SECRET=supercoolsecret
```
5. Run the server `node bin/www`

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

Contributions are always welcome!

## Credits
<commit_msg>Update README with instructions for working on the UI<commit_after># SourceGrade

[SourceGrade](http://www.sourcegrade.xyz/) is a web scraping app built with MongoDB, Express.js, Node.js, React, and Redux for [GradeSource](http://www.gradesource.com/). SourceGrade is designed to make your life easier by finding all your scores for a particular class on GradeSource, and presenting all the data in a meaningful and elegant way. It also allows you to create accounts to save all your information for a class so that you never have to remember your secret number or course url again!

## Usage

1) Add your class url [here](http://www.sourcegrade.xyz/add) if it hasn't already been previously added.

2) Enter your Secret Number and Class in the input fields

![enter info](https://github.com/joelseq/SourceGrade/blob/master/img/image1.png)

3) View your scores and statistics for each assessment or category.

![view scores](https://github.com/joelseq/SourceGrade/blob/master/img/image2.png)

![view scores 2](https://github.com/joelseq/SourceGrade/blob/master/img/image3.png)

In addition, if you want to use the API directly the route is:

`http://www.sourcegrade.xyz/api/scrape?id={secret number}&url={class url}`

Example API Request:

`http://www.sourcegrade.xyz/api/scrape?id=8010&url=http://www.gradesource.com/demo/example1/index.html`

## Install and run locally

To install and run this on your local machine you need [MongoDB](https://www.mongodb.com/)

1. Clone this repository
2. Run `npm install`
3. Start MongoDB
4. Create a `.env` file in the main directory, providing the two environment variables DB_URI (url to your MongoDB server) and SECRET (secret for encrypting JSONWebTokens).
Example:
```
DB_URI=mongodb://localhost:27017/sourcegrade
SECRET=<PASSWORD>
```
5. Run the server `node bin/www`

## Development

If you are working on the UI, you can run `webpack -w` to watch for changes to React files and automatically build the bundle. When you are ready to build a production bundle run `webpack -p` (Make sure to do this before committing the `bundle.js` file).

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

Contributions are always welcome!

## Credits

{'fraction_non_alphanumeric': 0.10146561443066517, 'fraction_numerical': 0.01217587373167982, 'mean_word_length': 4.545, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 8, 'lorem ipsum': 0, 'www.': 16, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1232276', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1300, 'n_words': 545}