diff --git a/local/bin/luma-both-to-png b/local/bin/luma-both-to-png index a6274f8..4db10db 100755 --- a/local/bin/luma-both-to-png +++ b/local/bin/luma-both-to-png @@ -1,3 +1,4 @@ #!/bin/zsh -date=${1%_*.bmp} -magick ${date}_top.bmp ${date}_bot.bmp -alpha set -gravity Center -background 'rgba(0,0,0,0)' -append ${date}.png +for date in ${(u)argv[@]%_*.bmp}; do + magick ${date}_top.bmp ${date}_bot.bmp -alpha set -gravity Center -background 'rgba(0,0,0,0)' -append ${date}.png || exit $? +done diff --git a/local/bin/luma-to-png b/local/bin/luma-to-png index 6c4bbf0..ab96304 100755 --- a/local/bin/luma-to-png +++ b/local/bin/luma-to-png @@ -1,2 +1,6 @@ #!/bin/zsh -magick $1 -alpha set -fill 'rgba(0,0,0,0)' -draw 'color 0,0 point' $1:r.png +for src in $argv; do + dest=$src:r.png + [[ $src = *.png ]] && dest=${src:r}_twitter.png + magick $src -alpha set -fill 'rgba(0,0,0,0)' -draw 'color 0,0 point' $dest || exit $? +done