putin-os - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- putin-os (552B) --- 1 #!/bin/sh 2 3 die() { 4 printf '%s\n' "$1" >&2 5 exit 1 6 } 7 8 if test $# -ne 2; then 9 die "usage: ${0##*/} <file> <outimagefile>" 10 fi 11 12 mimetype="$(file -ib "$1")" 13 case "$mimetype" in 14 video/*) 15 in="$(mktemp).jpg" 16 ffmpeg -i "$1" -frames:v 1 "$in";; 17 image/*) 18 in="$1";; 19 *) 20 die "file type '${mimetype}' not supported";; 21 esac 22 23 magick convert /home/annna/bin/modules/filter-media/putin-computing.png \ 24 \( "${in}" \ 25 -matte \ 26 -virtual-pixel transparent \ 27 -resize 150x150 \ 28 -shear 5x-4 \ 29 \) \ 30 -geometry +485-35 \ 31 -gravity center \ 32 -composite "$2"