Git Product home page Git Product logo

homework-py's Introduction

homework-py

Released to PyPi

An unofficial wrapper for FACTS SIS Renweb. It utilizes a combination of web scraping and data parsing to objectify student data. There are plans to branch out to other services like Canvas, Moodle, and Google Classroom.

What is going to happen:

  • Extension to Canvas API

Why is this project a little dead?

TLDR: It got really difficult to keep up with the changes to the websites. Webscraping for makeshift api is not a sound way of doing this. Or at least I think.... `¯\_(ツ)_/¯` While I was working on attempting to reverse engineer another login form for Renweb, I came to the conclusion that it was not worth the effort trying to reverse every single login for each and every school. I don't know the actual sitemaps of individual pages for different schools as they may be able to edit the layout. I am also pretty stuck on some problems, but I have none to list because they require a ton of access to real datasets from my school's database. I think it was when I saw the global login form, I lost the groove that drove the first ~45 commits. If I find anything out, I may hit back to this repo, but for now, this is just a web scraping wrapper for Renweb. (Posing as a normal wrapper for an api that I don't have access to. Renweb closed that off a while ago, and you have to partner with them for heavy business - according to what I read.)

I won't fully let go of this project as a maintainer, I simply would like to step back, (especially because I have no data to work with) and learn a little bit more about the subject matter and target problem. :) Cheers!

Getting started

How to install

pip install -U homeworkpy

Features

  • Assignment Due Date Sorting
  • Automatic Syncing and Scraping
  • Import Renweb Report cards
  • Keep track of assignments through iCal files
  • Fetch ics files from url or drive path.
  • import student-visible gradebook (the actual goodness of the project. Dataset not available untill November 2022. :( )

How to Import

from homeworkpy import homework

How to initialize a student

bob_ross = homework.Student(
    name="Bob Ross",
    providers={"https://awesomecalendarwebsite.com/bobross/export.ics": True},
    email="[email protected]",
    renweb=True,
    renweb_link="renweb_link",
    renweb_credentials={
        "DistrictCode": "HAR-TX",
        "username": "bross@woopainting!!.com",
        "password": "titaniumwhite",
        "UserType": "PARENTSWEB-STUDENT", # this is difficult to narrow down. This is why this library is not applicable to everyone. The form data input names changed per page.
        "login": "Log+In",
    },
    auto_sync=True

)

In that snippet, we initialize a Student object with the name Bob Ross, and then tell the homework fetcher the icalendar files. The boolean value accompanying the icalendar paths determines whether or not it is a local file on the machine. We provide an optional email, and give the renweb_link. This link is the url of the root of the SIS server. The credentials are given in dictionary form. This is where the project dies a little bit. This is actually form data, but in a python dict. For now, I only have the form data working on one website. Feel free to contribute your own school.

if ns.synced:
    ns.sort_assignments()
    ns.print_assignments()

Finally, if the auto_sync automatically synced with all the provided files and servers, we sort the assignments in chronological order, and print them to the console in a nice table format. The output may look like this:

Bob Ross's assignments
┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Name                     ┃ Description                            ┃ Due Date      ┃ course    ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Happy Birthday Merica    │Wahoo this is a great day               │ July 04, 2022 │ No course │
└──────────────────────────┴────────────────────────────────────────┴───────────────┴───────────┘

I made this for fun to see how I could extract my grades with code.

Awesome dependencies of this library(!!)

Full list of technical dependencies found here.

  • beautifulsoup4 = {version = "4.11.1"}
  • recurring-ical-events = {version = "1.0.2b0"}
  • requests = {version = "2.28.0"}
  • rich = {version = "12.4.4"}

MIT License

Copyright (c) 2022 Nathan Solis

homework-py's People

Contributors

coldenate avatar

Watchers

 avatar

homework-py's Issues

Rework Works object

Overview

The works class should be renames to Assignment.

A boolean attribute will be given.

isHomework

Naming the class homework would possibly lead people to infer a restricted usage to only assignments sent home with a student. However, naming it Work appeared to be very vague and unfamiliar.

Naming the class Assignment is quite fitting as that is the general term for the academic task a teacher may require a student to complete. (Whether in-classroom or not)

Global Object Types not used accurately.

Description

For example, the Student.works variable will hold a list of dictionaries containing report cards, but we could convert this to a list of Subject objects.

URGENT: Work on Documentation

This project lacks documentation. The first step of documentation is QuickStart examples in the project readme. This will be the initial area where I publish the package. After this, I will take a break from development and work on documentation.
I will use this tutorial.

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.