From eb2697bafc24aef99f85b54024bdf8033ab78c83 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 12 Jun 2019 12:48:51 +0000 Subject: [PATCH] [zsh] add function to extract all attachments from mkv file --- home/.zshrc.local | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home/.zshrc.local b/home/.zshrc.local index 8b48158..da17289 100644 --- a/home/.zshrc.local +++ b/home/.zshrc.local @@ -152,6 +152,10 @@ function urlencode() { python3 -c 'import urllib.parse; print(urllib.parse.quote(open(0, "rb").read()))' } +function mkvextract-all-attachments() { + mkvextract $1 attachments $(mkvmerge --identify $1|grep 'Attachment ID'|sed 's/Attachment ID \([0-9]*\): .*/\1/') +} + # Audacious does not support symlinks; hack around that function audacious-hack() { (