shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slideshow Raspberry Pi


From: josuebragagnolo
Subject: Re: Slideshow Raspberry Pi
Date: 26 Jul 2016 21:13:56 -0700

Pedro, segue minha pequena colaboração

Só ajustar os parâmetros no cabeçalho conforme sua necessidade.


#########################################

#!/bin/bash
TIMEOUT=5
DIR='/tmp/teste_img_vid'
INFINITO=1

function reproduz() {
        for i in `ls -v $DIR/*`
        do
                ext=`echo $i | awk -F\. '{print $NF}'`
                if [ "$ext" == "jpg" ]
                then
                        eog -f $i &
                        sleep $TIMEOUT
                        kill `pidof -x eog`
                fi

                if [ "$ext" == "mp4" ]
                then
                        mplayer -fs $i
                fi
        done

        if [ $INFINITO -eq 1 ]
        then
                reproduz
        fi
}

reproduz

######################################################################


reply via email to

[Prev in Thread] Current Thread [Next in Thread]