user
4 years ago
commit
b792785587
3 changed files with 44 additions and 0 deletions
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash |
||||
|
||||
## Dependencies |
||||
# ImageMagick (convert and identify) |
||||
# bc |
||||
|
||||
count=0; |
||||
(for name in "$@"; do |
||||
geometry=$(identify -verbose "$name" | grep geometry | cut -d' ' -f5 | cut -d'+' -f1) |
||||
width=`echo $geometry | cut -d'x' -f1` |
||||
height=`echo $geometry | cut -d'x' -f2` |
||||
|
||||
if [ $width -gt $height ]; then |
||||
resize="512" |
||||
else |
||||
resize="x512" |
||||
fi |
||||
|
||||
convert "$name" -resize $resize "$name.png" |
||||
count=$(echo "($count + 1)" | bc) |
||||
percent=$(echo " scale=2; ( 100 * ($count/$#))" | bc ) |
||||
echo "$percent" |
||||
done; |
||||
) | zenity --progress --percentage=0 --auto-close --text="Making Stickers" |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
|
||||
count=0; |
||||
( for file in "$@"; do |
||||
ffmpeg -nostdin -y -i "$file" "$file.mp3" |
||||
count=$(echo "($count + 1)" | bc) |
||||
|
||||
percent=$(echo " scale=2; ( 100 * ($count/$#))" | bc ) |
||||
echo "$percent" |
||||
done ) | zenity --progress --percentage=0 --auto-close --text="Converting files" |
@ -0,0 +1,10 @@
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
|
||||
count=0; |
||||
( for file in "$@"; do |
||||
ffmpeg -nostdin -y -i "$file" "$file.mp4" |
||||
count=$(echo "($count + 1)" | bc) |
||||
|
||||
percent=$(echo " scale=2; ( 100 * ($count/$#))" | bc ) |
||||
echo "$percent" |
||||
done ) | zenity --progress --percentage=0 --auto-close --text="Converting files" |
Loading…
Reference in new issue