Skip to content

Instantly share code, notes, and snippets.

@jordanwesthoff
Created May 8, 2015 16:25
Show Gist options
  • Save jordanwesthoff/a72e782f7670db941d8b to your computer and use it in GitHub Desktop.
Save jordanwesthoff/a72e782f7670db941d8b to your computer and use it in GitHub Desktop.
Temp example for MATT
# Written like it was in shell, not sure what the right python calls are, just an FYI
mkdir -p /dev/shm/pdf_convert
cp /current_scantron_directory/pdf_image /dev/shm/pdf_convert
convert_function /dev/shm/pdf_convert/filename /dev/shm/pdf_convert/converted_filenames
cp /dev/shm/pdf_convert/* /current_scantron_directory
#So here, the script copies the image to a custom made (you can pick the name) directory in shared memory, better known as the temp #directory. Then it runs whatever convert function you have there and puts out the images based on whatever syntax you run the conversion #with. Then it copies all of the temp directories contents back into your scantron directory. All of the paths are made up, but they should #be easy to understand because they are just placeholders for your current working directories. Temp will always be in /dev/shm though
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment