Skip to content

Instantly share code, notes, and snippets.

@iamevn
Created June 13, 2016 23:23
Show Gist options
  • Save iamevn/fedceb93c67efd3232d946a7d61c617b to your computer and use it in GitHub Desktop.
Save iamevn/fedceb93c67efd3232d946a7d61c617b to your computer and use it in GitHub Desktop.
function extract_mkv_fonts
set -l BEFORE (ls | wc -l)
set -l COUNT 0
for FILE in $argv
set COUNT (math $COUNT + 1)
mkvextract attachments $FILE (mkvmerge -i $FILE | grep -o Attachment\ ID\ [0-9]\*: | grep -o [0-9]\*) 1> /dev/null
end
echo Extracted (math (ls | wc -l) - $BEFORE) fonts from $COUNT files
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment