From c22fd22249ac6843fef54a8ce041e2cca8b16c12 Mon Sep 17 00:00:00 2001 From: Felipe M Date: Wed, 27 Jan 2021 11:09:20 +0100 Subject: [PATCH] zsh: Added helper function to convert webp to jpg --- .zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.zshrc b/.zshrc index a891e83..911ce5a 100644 --- a/.zshrc +++ b/.zshrc @@ -7,6 +7,14 @@ source $ZSH/oh-my-zsh.sh alias magit="emacs -nw --eval '(progn (magit-status) (delete-other-windows))'" alias ytdlf="youtube-dl -a ./youtube-dl.txt -f best -o \"./%(playlist_title)s/%(playlist_index)s_%(title)s.%(ext)s\"" +function webp2jpg { + for x in ls *.webp; do + ffmpeg -i "$x" "${x%.webp}.jpg"; + done + + rm *.webp +} + # GPG tty export GPG_TTY=$(tty)