Large update
This commit is contained in:
30
binaries.org
30
binaries.org
@@ -951,9 +951,7 @@ svg2() { \
|
||||
|
||||
# Convert PDF Files
|
||||
pdf2() { \
|
||||
out_ext=$(echo -e "svg\npng" | rofi -i -dmenu -p "Convert PDF to")
|
||||
|
||||
# Ask if crop?
|
||||
out_ext=$(echo -e "svg\npng\nreduce" | rofi -i -dmenu -p "Convert PDF to")
|
||||
|
||||
if [ -z "$out_ext" ]; then
|
||||
exit;
|
||||
@@ -963,6 +961,9 @@ pdf2() { \
|
||||
"png")
|
||||
inkscape --export-type="$out_ext" --export-dpi=200 --export-area-drawing "$filename_with_extension"
|
||||
;;
|
||||
"reduce")
|
||||
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$filename_without_extension.red.pdf" "$filename_with_extension"
|
||||
;;
|
||||
"svg")
|
||||
inkscape --export-type="$out_ext" "$filename_with_extension"
|
||||
;;
|
||||
@@ -984,9 +985,24 @@ docx2() { \
|
||||
esac
|
||||
}
|
||||
|
||||
# Convert GIF Files
|
||||
gif2() { \
|
||||
out_ext=$(echo -e "png" | rofi -i -dmenu -p "Convert GIF to")
|
||||
|
||||
if [ -z "$out_ext" ]; then
|
||||
exit;
|
||||
fi
|
||||
|
||||
case "$out_ext" in
|
||||
"png")
|
||||
convert -coalesce "$filename_with_extension" "$filename_without_extension.png"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Convert PNG Files
|
||||
png2() { \
|
||||
out_ext=$(echo -e "pdf" | rofi -i -dmenu -p "Convert PNG to")
|
||||
out_ext=$(echo -e "pdf\ntrim" | rofi -i -dmenu -p "Convert PNG to")
|
||||
|
||||
if [ -z "$out_ext" ]; then
|
||||
exit;
|
||||
@@ -996,6 +1012,9 @@ png2() { \
|
||||
"pdf")
|
||||
convert "$filename_with_extension" "$filename_without_extension.pdf"
|
||||
;;
|
||||
"trim")
|
||||
convert -trim "$filename_with_extension" "$filename_with_extension" # Maybe should ask new filename
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -1018,6 +1037,9 @@ case "$in_ext" in
|
||||
"svg")
|
||||
svg2
|
||||
;;
|
||||
"gif")
|
||||
gif2
|
||||
;;
|
||||
"pdf")
|
||||
pdf2
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user