URI: 
       add putin filter - 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
       ---
   DIR commit 6048db1f9eeb03f8e604bc144437caf2e92ee367
   DIR parent 276503e74025524acb118ef563c24a643ed0ed86
  HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Sat,  5 Mar 2022 19:01:11 +0100
       
       add putin filter
       
       Signed-off-by: Annna Robert-Houdin <annna@bitreich.org>
       
       Diffstat:
         M annna-message-common                |       6 ++++++
         A putin-os                            |      32 +++++++++++++++++++++++++++++++
       
       2 files changed, 38 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/annna-message-common b/annna-message-common
       @@ -817,6 +817,7 @@ case "${text}" in
        "${botname}, please doomify #"*|\
        "${botname}, please loop #"*|\
        "${botname}, please mow #"*|\
       +"${botname}, please putin #"*|\
        "${botname}, please reverse #"*|\
        "${botname}, please science #"*|\
        "${botname}, please scrollify #"*|\
       @@ -852,6 +853,11 @@ case "${text}" in
                                        outpath="${outpath%.*}.jpg"
                                        antidepressant "${inpath}" "${outpath}" 2>&1 >/dev/null
                                        ;;
       +                        putin)
       +                                outfile="${outfile%.*}.jpg"
       +                                outpath="${outpath%.*}.jpg"
       +                                putin-os "${inpath}" "${outpath}" 2>&1 >/dev/null
       +                                ;;
                                *)
                                        ffmpeg-effect "${filter}" "${inpath}" "${outpath}" 2>&1 >/dev/null
                                        ;;
   DIR diff --git a/putin-os b/putin-os
       @@ -0,0 +1,32 @@
       +#!/bin/sh
       +
       +die() {
       +        printf '%s\n' "$1" >&2
       +        exit 1
       +}
       +
       +if test $# -ne 2; then
       +        die "usage: ${0##*/} <file> <outimagefile>"
       +fi
       +
       +mimetype="$(file -ib "$1")"
       +case "$mimetype" in
       +        video/*)
       +                in="$(mktemp).jpg"
       +                ffmpeg -i "$1" -frames:v 1 "$in";;
       +        image/*)
       +                in="$1";;
       +        *) 
       +                die "file type '${mimetype}' not supported";;
       +esac
       +
       +convert /home/annna/bin/modules/filter-media/putin-computing.png \
       +        \( "${in}" \
       +                -matte \
       +                -virtual-pixel transparent \
       +                -resize 150x150 \
       +                -shear 5x-4 \
       +        \) \
       +        -geometry +485-35 \
       +        -gravity center \
       +        -composite "$2"