Last active
August 29, 2015 14:03
-
-
Save Mebus/73cbc18653a4c8e18996 to your computer and use it in GitHub Desktop.
simple example script to join lecture notes with python and pdfjoin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
def shellquote(s): | |
return "'" + s.replace("'", "'\\''") + "'" | |
files = sorted(os.listdir("./")) | |
shellstring = "" | |
print "Joining the follwoing files:" | |
for filename in files: | |
if not 'Handzettel' in filename and 'pdf' in filename and not 'Druckversion' in filename: | |
filename = filename.replace(" ", "\\ ") | |
print filename | |
shellstring = shellstring+" "+filename+"" | |
print "\n===================\nTo join run \n===================\n\n" | |
print "pdfjam --fitpaper true --rotateoversize false --suffix joined --outfile joined.pdf "+shellstring |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment