Skip to content

Instantly share code, notes, and snippets.

@bmidgley
Created January 7, 2020 04:21
Show Gist options
  • Save bmidgley/956eb58da6a1149d10d6f35b8b7a98ba to your computer and use it in GitHub Desktop.
Save bmidgley/956eb58da6a1149d10d6f35b8b7a98ba to your computer and use it in GitHub Desktop.
send missing assignments out to the microbit to be printed and scrolled
#!/usr/bin/env python3
# sudo apt install python3-bs4
# curl -d 'sessionid=123&encses=456' https://skyward.alpinedistrict.org/scripts/wsisa.dll/WService=wsEAplus/sfgradebook001.w | ./missing-assignments.py >/dev/ttyACM0
from bs4 import BeautifulSoup
import sys
import time
soup = BeautifulSoup(sys.stdin.read(), 'html.parser')
missing = soup.find('div', id='missingAssignmentsModuleWrapper')
for assignment in missing.find_all('td'):
print(assignment.text)
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment