id scanner for taking attendance
run git pull
to update.
./id_scanner.py
to start the program- scan a student ID to log attendance.
- new IDs prompt for UIN.
- new UINs prompt for name.
- scan an admin ID (admin IDs are stored in a file named admins.py) to enter admin mode.
- end the program.
- use admin
exit
orquit
. - close terminal (not suggested, but probably OK)
- use admin
admin users can swipe in to access these functions:
- exit/quit to end program
- test to see what data is on a mag stripe
- rename students on roster
any unrecognized command (including empty) returns to main loop.
TAMU ID has an arbitraily chosen number written 3 times on the stripe. ID number and UIN must be manually linked, e.g. at first scan.
- Go to https://howdy.tamu.edu
- Login
- "Faculty / Teaching" tab
- "Class Roster and Syllabus" link
- Select current term, e.g. "Fall 2019 - College Station"
- For each section:
- "view" roster
- at bottom of page, "Import Entire Roster into CSV"
- rename file to course and section ID
- e.g. 22889.csv --> 121_513.csv
- rename file to course and section ID
- back at top of page, "Image Roster"
- "View Entire Roster"
- ctrl+s (save)
- rename file to course and section ID
- e.g. BWXKPHOTO.html --> 121_513.html
- rename file to course and section ID
- Put the image files and the csv files in the same folder
- e.g. ~/Downloads/image_rosters/
- 121_513.csv
- ...
- 121_513_files/
- ...
- the .html files are not needed
- e.g. ~/Downloads/image_rosters/
- Just in case this script goes awry, make a backup copy of the folder
- select image_rosters folder
- 2-finger click
- "Create Archive..."
- Add your details to this script (
batch_mode_rename_images.sh
) and execute it:
# absolute path to image rosters
pathToImageRosters="/home/instructor/Downloads/image_rosters"
# prefix of image files, e.g. "BWXK_GET_PHOTO(1).display"
photoPrefix="BWXK_GET_PHOTO"
# put your sections in the list {...}
# you can do this for multiple classes, too
# e.g. {121_{513..520},431_{500..502}}
for class in 121_{513..520}
do
# setup paths arguments
pathToPhotos="$pathToImageRosters/$class""_files"
pathToRoster="$pathToImageRosters/$class.csv"
# invoke the python script to rename images
python3 rename_images.py $pathToPhotos $photoPrefix $pathToRoster
# copy the images into the swipr/image/ folder
for img in "$pathToPhotos/*.jpeg"
do
cp $img ./image/
done
# add names and UINs to swipr/roster file
{
cut -d, -s -f1,2,4 $pathToRoster | sed '1d' | sed 's/,/\t/g'
} >> /home/instructor/Documents/swipr/roster
done
echo "Done!"
- Verify that swipr/image has a bunch of jpeg images with UINs for names
- Verify that swipr/roster has names and UINs
- It is now safe to delete the image_rosters folder
rm -r ~/Downloads/image_rosters