Skip to content

Instantly share code, notes, and snippets.

@dylanjm
Created October 24, 2016 00:47
Show Gist options
  • Save dylanjm/abfe56dfe7015846a6699c4e0d0f5952 to your computer and use it in GitHub Desktop.
Save dylanjm/abfe56dfe7015846a6699c4e0d0f5952 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Take all .html files in directory and covert them to .docx files for grading
# Check all .html files in directory for the string "Passed all tests with no errors"
# This way we can quickly sort files of people who may have had more trouble
# Move files that pass into a seperate directory than those with failed tests.
str="Passed all tests with no errors"
for file in *.html; do
pandoc -o "${file%.*}.docx" -s -S "$file"
if grep -q "$str" "$file"; then
mv "${file%.*}.docx" ../docx/testPass/
else
mv "${file%.*}.docx" ../docx/testFail/
fi
done
@dylanjm
Copy link
Author

dylanjm commented Oct 24, 2016

Teacher's Assistant Grade Organizer

A quick script used to help me grade and organize assignments for several Computer Science courses.

Make this script executable by using chmod +x gorg.sh

I called it "gorg" because it's short for grade-organize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment