Newer
Older
invertedlogic / Scripts / Nautilus / Convert JPG to PDF
@John Ryland John Ryland on 4 Jun 2009 300 bytes Nautilus scripts
#!/bin/bash
IFS='
'
fpaths=`echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | sort`
for file in $fpaths
do
  if [ -f "$file" ]; then
	ext=${file##*.}
	if [ "$ext" == "jpg" ]; then
		file=`dirname $file`/`basename $file .jpg`
		jpegtopnm $file.jpg | pnmtops -noturn | ps2pdf13 - $file.pdf
	fi
  fi
done