Put all files in /usr/share/contractor and enjoy converting images to PDFs ;)
Created
July 25, 2014 11:25
-
-
Save fabianthoma/e4ffa0e548fa126e7ace to your computer and use it in GitHub Desktop.
Create PDFs with Contractor
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
[Contractor Entry] | |
Name=Create PDF | |
Icon=document-convert | |
Description=Convert to a PDF File | |
MimeType=image | |
Exec=/usr/share/contractor/make-pdf.sh %F | |
X-GNOME-Gettext-Domain=gtk30 |
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
#!/bin/bash | |
printf '%s\n' "$@" | sort -n | tr '\n' ' ' | sed "s/$/\ $(echo $1 | sed -e 's/[\/&]/\\&/g')\.pdf/" | xargs convert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment