Rwrapper.sh

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(rwrapper.sh)
 
(6 dazwischenliegende Versionen von 5 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 
Vorschlag für ein einfaches ''Wrapper''-Skript, welches ''vor / nach / editieren'' einer Aufnahme ausgeführt werden kann.
 
Vorschlag für ein einfaches ''Wrapper''-Skript, welches ''vor / nach / editieren'' einer Aufnahme ausgeführt werden kann.
  
Übergabe.
+
==Übergabe==
 
+
 
  -r [[Struktur|$PATH]]/rwrapper.sh
 
  -r [[Struktur|$PATH]]/rwrapper.sh
 
  --record=[[Struktur|$PATH]]/rwrapper.sh
 
  --record=[[Struktur|$PATH]]/rwrapper.sh
Zeile 8: Zeile 7:
 
Siehe auch [[VDR Optionen]].
 
Siehe auch [[VDR Optionen]].
  
Quellen:
+
==rwrapper.sh==
 
+
* ''INSTALL'' (VDR)
+
* ''rwrapper.sh'' [[sharemarks]]
+
* ''scripts'' von [[noad]]
+
 
+
 
+
 
{{Box Datei | [[Struktur|$PATH]]/rwrapper.sh |
 
{{Box Datei | [[Struktur|$PATH]]/rwrapper.sh |
 
<pre>
 
<pre>
Zeile 26: Zeile 19:
 
NOAD="0"        # (0=off,1=on,2=online mode)
 
NOAD="0"        # (0=off,1=on,2=online mode)
 
SHAREMARKS="0"  # (0=off,1=on,2=upload after cut)
 
SHAREMARKS="0"  # (0=off,1=on,2=upload after cut)
 +
AUTOCUTTER="0"  # (0=off,1=on,2=manual edit)
  
# set the online-mode here
+
# set the noad online-mode here
 
# 1 means online for live-recording only
 
# 1 means online for live-recording only
 
# 2 means online for every recording
 
# 2 means online for every recording
 
ONLINEMODE="--online=1"
 
ONLINEMODE="--online=1"
  
# set additional args for every call here here
+
# set additional noad args for every call here here (not used by AutoCutter, see README)
 
ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/noadstat"
 
ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/noadstat"
 +
 +
# AutoCutter Options - see AutoCutter README/INSTALL for more
 +
ACBINDIR=/usr/local/vdr/bin
 +
NOADQ=/var/spool/vdrconvert/noad
 +
AUTOCUTLOG=/var/log/autocutter.log
  
 
case $1 in
 
case $1 in
Zeile 55: Zeile 54:
 
esac
 
esac
  
############
 
# sharemarks
 
############
 
case $SHAREMARKS in
 
    1|2) marks2pts $1 "$2"
 
  ;;
 
esac
 
 
;;
 
;;
 
     after)
 
     after)
 
echo "After recording $2"
 
echo "After recording $2"
  
############
+
        ############
# noad
+
        # noad
############
+
        ############
case $NOAD in
+
        case $NOAD in
    1) noad $1 $ADDOPTS "$2"
+
            1) noad $1 $ADDOPTS "$2"
;;
+
                ;;
    2) noad $1 $ADDOPTS $ONLINEMODE "$2"
+
            2) noad $1 $ADDOPTS $ONLINEMODE "$2"
;;
+
                ;;
esac
+
        esac
 +
 
 +
        ############
 +
        # AutoCutter
 +
        ############
 +
        case $AUTOCUTTER in
 +
            1|2) grep -q "$2" $NOADQ 2>/dev/null
 +
                if [ $? -ne 0 ]; then
 +
                  printf "%s " "$2" >>$NOADQ
 +
                  # Start NoAD Scan in 7 min.
 +
                  echo "printf '\n' >>$NOADQ" | at now+7 min
 +
                fi
 +
              ;;
 +
        esac
 
;;
 
;;
 
     edited)
 
     edited)
Zeile 83: Zeile 88:
 
############
 
############
 
case $SHAREMARKS in
 
case $SHAREMARKS in
    2) marks2pts -upload $1 "$2"
+
      2) marks2pts --non-interactive --upload $1 "$2"
 
;;
 
;;
 
esac
 
esac
 +
 +
############
 +
# AutoCutter
 +
############
 +
case $AUTOCUTTER in
 +
      2) $ACBINDIR/autocutter-edited.sh $* >>$AUTOCUTLOG 2>&1 &
 +
;;
 +
esac
 +
 
;;
 
;;
 
     *)
 
     *)
Zeile 91: Zeile 105:
 
;;
 
;;
 
esac
 
esac
 
############
 
# http://vdr-portal.de/board/thread.php?threadid=37211&hilight=noad
 
# ----
 
# Wenn eine Aufnahme gelöscht wird,
 
# die gerade von noad bearbeitet wird, sollte noad abbrechen.
 
# ----
 
# Der folgende Schnippsel, schaut ob die Verzeichnisse zum PID noch existieren,
 
# falls nicht wird der entsprechende PID gekillt. (benötigt: ps, pidof, screen)
 
############
 
# if ! screen -ls | egrep -q noadwatch ; then
 
#    screen -dmS noadwatch sh -c "while pidof noad ; do \
 
# for i in \$(pidof noad) ; do \
 
#     sleep 5s ; ARGS=\$(ps --no-heading -p \$i -o %a) ; \
 
#     if [ ! -d \"\${ARGS##* }\" -a -n \"\${ARGS##* }\" ] ; then \
 
# if ps -p \$i ; then \
 
#     kill -9 \$i ; \
 
# fi ; \
 
#     fi ; \
 
# done ; \
 
#    done"
 
# fi
 
############
 
  
 
exit $?
 
exit $?
 
</pre>
 
</pre>
 
}}
 
}}
 +
 +
==Quellen==
 +
* ''INSTALL'' (VDR)
 +
* ''rwrapper.sh'' [[sharemarks]]
 +
* ''scripts'' von [[noad]]
  
 
[[Kategorie:Skripte]]
 
[[Kategorie:Skripte]]
 
 
 
 
 
 
 
 
 
 
 
 
 
<div  style="display:none">
 
[We are delicate. We do not delete your content.]
 
[l_sp2006]
 
http://top20man.in.ua/black-eyed-peas-mp3 black eyed peas mp3]
 
[http://top20man.in.ua/madonna-mp3 madonna mp3]
 
[http://top20man.in.ua/eminem-mp3 eminem mp3]
 
[http://ringtonemaker.blogs.eurosport.com/ ringtone maker]
 
[http://top20man.in.ua/godsmack-awake godsmack awake]
 
[http://top20man.in.ua/godsmack-voodoo godsmack voodoo]
 
[http://top20man.in.ua/sean-paul-temperature sean paul temperature]
 
[http://top20man.in.ua/sean-paul-we-be-burnin sean paul we be burnin]
 
[http://top20man.in.ua/bad-day-daniel-powter bad day daniel powter]
 
[http://top20man.in.ua/system-of-a-down-mp3 system of a down mp3]
 
[http://top20man.in.ua/sean-paul-mp3 sean paul mp3]
 
[http://top20man.in.ua/metallica-mp3 metallica mp3]
 
[http://top20man.in.ua/shakira-mp3 shakira mp3]
 
[http://top20man.in.ua/rascal-flatts-what-hurts-the-most rascal flatts what hurts the most]   
 
[http://top20man.in.ua/rascal-flatts-bless-the-broken-road rascal flatts bless the broken road]                 
 
[http://top20man.in.ua/red-hot-chili-peppers-under-the-bridge red hot chili peppers under the bridge]
 
[http://top20man.in.ua/james-blunt-wisemen james blunt wisemen]
 
[http://top20man.in.ua/bad-day-daniel-powter bad day daniel powter]
 
[http://top20man.in.ua/godsmack-mp3 godsmack mp3]
 
[http://blog.yukonho.com/index.php?blog=44 Godsmack Awake]
 
[http://blog.yukonho.com/index.php?blog=45 godsmack voodoo]
 
[http://blog.yukonho.com/index.php?blog=46 sean paul temperature]
 
[http://blog.yukonho.com/index.php?blog=47 Sean Paul We Be Burnin]
 
[http://blog.yukonho.com/index.php?blog=48 natasha bedingfield unwritten]
 
[http://blog.yukonho.com/index.php?blog=49 50 cent mp3]
 
[http://blog.yukonho.com/index.php?blog=50 Bad Day Daniel Powter]
 
[http://blog.yukonho.com/index.php?blog=51 Daniel Powter mp3]
 
[http://blog.yukonho.com/index.php?blog=52 Goodbye My Lover James Blunt]
 
[http://blog.yukonho.com/index.php?blog=53 System Of A Down mp3]
 
[http://blog.yukonho.com/index.php?blog=54 Sean Paul mp3]
 
[http://blog.yukonho.com/index.php?blog=55 Metallica mp3]
 
[http://blog.yukonho.com/index.php?blog=56 Shakira mp3]
 
[http://blog.yukonho.com/index.php?blog=57 Black Eyed Peas mp3]
 
[http://blog.yukonho.com/index.php?blog=58 Madonna mp3]
 
[http://blog.yukonho.com/index.php?blog=59 eminem mp3]
 
[http://blog.yukonho.com/index.php?blog=60 Fall Out Boy Grand Theft Autumn]
 
[http://blog.yukonho.com/index.php?blog=61 Jack Johnson mp3]
 
[http://blog.yukonho.com/index.php?blog=62 oscar dresses]
 
[http://blog.yukonho.com/index.php?blog=63 mother of the bride dresses]
 
[http://blog.yukonho.com/index.php?blog=64 cocktail dresses]
 
[http://blog.yukonho.com/index.php?blog=65 Flower Girl Dresses]
 
[http://blog.yukonho.com/index.php?blog=66 Formal prom Dresses]
 
[http://blog.yukonho.com/index.php?blog=67 Plus Size Prom Dresses]
 
[http://blog.yukonho.com/index.php?blog=68 Free Verizon Ringtone]
 
[http://top20man.in.ua/godsmack-i-stand-alone godsmack i stand alone]
 
[http://top20man.in.ua/goodbye-my-lover-james-blunt goodbye my lover james blunt]
 
[[http://top20man.in.ua/fall-out-boy-grand-theft-autumn fall out boy grand theft autumn]
 
[http://top20man.in.ua/jack-johnson-mp3 jack johnson mp3]
 
[http://top20man.in.ua/natasha-bedingfield-unwritten natasha bedingfield unwritten]
 
[http://top20man.in.ua/50-cent-mp3 50 cent mp3]
 
[http://blogs.wwwcoder.com/cleo/ nextel ringtone]
 
[http://top20man.in.ua/bad-day-daniel-powter bad day daniel powter]
 
[http://top20man.in.ua/daniel-powter-mp3 daniel powter mp3]
 
[http://verizonringtone.forumco.com/ verizon ringtone]
 
[http://uscellularringtone.forumco.com US Cellular Ringtone]
 
[http://novogate.com/board/5907/222695-1.html free sprint ringtone]
 
[http://4898.rapidforum.com verizon ringtone]
 
[http://blogs.heraldextra.com/verizonringtone/ verizon ringtone]
 
[http://blog.investing.com/bcbgshoes/ bcbg shoes]
 
[http://blog.yukonho.com/index.php?blog=40 free sprint ringtones]
 
[http://blog.yukonho.com/index.php?blog=41 cheap prom dresses]
 
[http://blog.yukonho.com/index.php?blog=42 sexy prom dresses]
 
[http://www.buddyprofile.com/viewprofile.php?username=waterfordcrystal waterford crystal]
 
[http://www.buddyprofile.com/viewprofile.php?username=swarovskicrystal swarovski crystal bead]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomalawsuits mesothelioma lawsuits]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomasymptoms mesothelioma symptoms]
 
[http://www.buddyprofile.com/viewprofile.php?username=mesotheliomadiag mesothelioma diagnosis]
 
[http://blog.yukonho.com/index.php?blog=69 Cingular Ringtone]
 
[http://blog.yukonho.com/index.php?blog=70 free kyocera ringtones]
 
[http://blog.yukonho.com/index.php?blog=71 Free Nextel Ringtone]
 
[http://blog.yukonho.com/index.php?blog=73 informal wedding dresses]
 
[http://blog.yukonho.com/index.php?blog=74 bridal gowns]
 
[http://blog.yukonho.com/index.php?blog=75 Discount Bridal Gowns]
 
[http://blog.yukonho.com/index.php?blog=76 Plus Size Swimwear]
 
[http://blog.yukonho.com/index.php?blog=77 no fax payday loans]
 
[http://blog.yukonho.com/index.php?blog=78 countrywide home loans]
 
[http://blog.yukonho.com/index.php?blog=79 fast cash loan guaranteed]
 
[http://www.totalvideogames.com/blog/naturalizershoes/ Naturalizer Shoes]
 
[http://www.totalvideogames.com/blog/freekyocerarington/ Free Kyocera Ringtone]
 
[http://www.surfbirds.com/blog/formalpromdresses/ formal prom dresses]
 
[http://www.missoula.com/blog/sexypromdresses/ Sexy Prom Dresses]
 
[http://www.justachat.com/blog/?w=naturalizershoes Naturalizer Shoes][http://www.westwoodbapt.org/blog/towelwarmer/ towel warmer]
 
[http://www.toutelapoesie.com/blog/aerobed/ Aero Bed]
 
 
 
</div>
 

Aktuelle Version vom 22. Oktober 2007, 19:36 Uhr

Vorschlag für ein einfaches Wrapper-Skript, welches vor / nach / editieren einer Aufnahme ausgeführt werden kann.

[Bearbeiten] Übergabe

-r $PATH/rwrapper.sh
--record=$PATH/rwrapper.sh

Siehe auch VDR Optionen.

[Bearbeiten] rwrapper.sh

Datei
$PATH/rwrapper.sh
#!/bin/sh
#
# rwrapper.sh
#
# an example script for use with the '-r' option could look like this:

CLIPINC="0"     # (0=off,1=on)
NOAD="0"        # (0=off,1=on,2=online mode)
SHAREMARKS="0"  # (0=off,1=on,2=upload after cut)
AUTOCUTTER="0"  # (0=off,1=on,2=manual edit)

# set the noad online-mode here
# 1 means online for live-recording only
# 2 means online for every recording
ONLINEMODE="--online=1"

# set additional noad args for every call here here (not used by AutoCutter, see README)
ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/noadstat"

# AutoCutter Options - see AutoCutter README/INSTALL for more
ACBINDIR=/usr/local/vdr/bin
NOADQ=/var/spool/vdrconvert/noad
AUTOCUTLOG=/var/log/autocutter.log

case $1 in
     before)
	echo "Before recording $2"

	############
	# clipinc
	############
	case $CLIPINC in
	     1) vdrrecinfo.pl $1 "$2"
		;;
	esac

	############
	# noad
	############
	case $NOAD in
	     2) noad $1 $ADDOPTS $ONLINEMODE "$2"
		;;
	esac

	;;
     after)
	echo "After recording $2"

        ############
        # noad
        ############
        case $NOAD in
             1) noad $1 $ADDOPTS "$2"
                ;;
             2) noad $1 $ADDOPTS $ONLINEMODE "$2"
                ;;
        esac

        ############
        # AutoCutter
        ############
        case $AUTOCUTTER in
             1|2) grep -q "$2" $NOADQ 2>/dev/null
                 if [ $? -ne 0 ]; then
                   printf "%s " "$2" >>$NOADQ
                   # Start NoAD Scan in 7 min.
                   echo "printf '\n' >>$NOADQ" | at now+7 min
                 fi
               ;;
        esac
	;;
     edited)
	echo "Edited recording $2"

	############
	# sharemarks
	############
	case $SHAREMARKS in
	      2) marks2pts --non-interactive --upload $1 "$2"
		;;
	esac

	############
	# AutoCutter
	############
	case $AUTOCUTTER in
	      2) $ACBINDIR/autocutter-edited.sh $* >>$AUTOCUTLOG 2>&1 &
		;;
	esac

	;;
     *)
	echo "ERROR: unknown state: $1"
	;;
esac

exit $?


[Bearbeiten] Quellen