Package: homeworkpy
homework-pyAn unofficial wrapper for FACTS SIS Renweb. It utilizes a combination of web scraping and data parsing to objectify student data.
Thereareplans to branch out to other services like Canvas, Moodle, and Google Classroom.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.)This repo will capture what I was able to write at an educational standpoint. My knowledge of oop and data comprehension. If you go to the school "HCA" and understand the following abbreviations [HCA, FBC] and know a man with a name that sounds like "oKaywould" - then I have good news for you. This project does work with our school's sitemap because it is the only one I have the ability to test in.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 startedHow to installpipinstall-UhomeworkpyFeaturesAssignment Due Date SortingAutomatic Syncing and ScrapingImport Renweb Report cardsKeep track of assignments through iCal filesFetch 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 ImportfromhomeworkpyimporthomeworkHow to initialize a studentbob_ross=homework.Student(name="Bob Ross",providers={"https://awesomecalendarwebsite.com/bobross/export.ics":True},email="bobross@painting.com",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.ifns.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:BobRoss'sassignments┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃Name┃Description┃DueDate┃course┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│HappyBirthdayMerica│Wahoothisisagreatday│July04,2022│Nocourse│
└──────────────────────────┴────────────────────────────────────────┴───────────────┴───────────┘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 foundhere.beautifulsoup4 = {version = "4.11.1"}recurring-ical-events = {version = "1.0.2b0"}requests = {version = "2.28.0"}rich = {version = "12.4.4"}MIT LicenseCopyright (c) 2022 Nathan Solis