Code Monkey home page Code Monkey logo

epigrades's Introduction

Epigrades 🎓

This project is a more glamorous and faster Gandalf (the intranet of Epitech). On this website you can retrieve my own grades ordered by semesters and also by modules, and the possibility for you student to see your grades easily !

Table of contents

  1. How to use it ?
  2. Technical guide
  3. Technologies
  4. Authors

How to use it ?

Go to epigrades, enter your Microsoft Epitech credentials, give your authentication code and that's it !

Tips: if you do not receive any notification, open your authenticator app and refresh the home screen to check for notifications.

For more confidentiality you will have a private token linked to your account.

Technical guide

First, you need to clone the repository.

$ git clone https://github.com/AlxisHenry/epigrades.git
$ cd epigrades

Install javascript dependencies

Note that I'm using pnpm instead of npm

$ pnpm install
$ pnpm run build
$ pnpm start

The web application is now running on http://localhost:3000.

Configure the puppeteer bot

The puppeteer bot is used to scrap the grades from the intranet. You can use it to scrap your grades and then use the web application to see your statistics.

Note: the bot is supporting SMS 2FA authentication and Microsoft Authenticator application usage.

You need to install the apt packages with the following command:

cd scraper
bash packages.sh

Testing

$ node scraper/index.js <email> <password> <uuid>
Using SMS A2F

When you run the script, you will be asked for an OTP code, which you should normally receive by phone.

You just need to run the otp.sh script using the following command:

$ bash scraper/otp.sh <uuid> <code>
Using Microsoft Authenticator

When you run the script, your A2F app will ask for a code of two digits, you can retrieve this code in the scraper/temp folder, in png format in a file named authenticator-<uuid>.png.

Access to your report

When the script is finished, you can access with the web application to your grades with the following url:

http://localhost:3000/online/<uuid>

For example, the default file is named me.json, so the url will be:

http://localhost:3000/online/me

API usage

The uuid parameter is the name of the file in the scraper/reports folder.

You can use the API to get your report in JSON format with the following command:

$ curl -X GET http://localhost:3000/api/online/<uuid>

Average

You can get the average of all your grades with the following endpoint:

$ curl -X GET http://localhost:3000/api/average?uuid=<uuid>

Without the uuid parameter, the API will return by default the average of the me.json file.

Note: If the given uuid is not found, the API will return -1.

Report (in PDF format)

You can get your report (in PDF format) encoded in base64 using the following endpoint:

$ curl -X GET http://localhost:3000/api/online/<uuid>/pdf

Note: If the given uuid is not found, the API will return null instead of the base64.

Technologies

Authors

epigrades's People

Contributors

alxishenry avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

epigrades's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.