Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. import sys
  2. import os
  3. import csv
  4. import subprocess
  5.  
  6. source_dir = "\\\\192.168.1.200\\Microfilm\\CID01489 - Standard School District\\JID01055 - Microfiche Scanning (under MSA)\\SFTP\\Delivery"
  7. out_dir = "\\\\192.168.1.200\\Microfilm\\CID01489 - Standard School District\\JID01055 - Microfiche Scanning (under MSA)\\Combined"
  8.  
  9. dirs = [dir for dir in os.listdir(source_dir) if os.path.isdir(os.path.join(source_dir, dir))]
  10.  
  11. for dir in dirs:
  12. if dir != "Sample" and dir != "Out":
  13. print("Generating %s.pdf..." % dir)
  14. sys.stdout.flush()
  15. full_path = os.path.join(source_dir, dir)
  16. subprocess.call("magick \"%s/*.jpg\" \"%s/%s.pdf\"" % (full_path, out_dir, dir))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement