Installscript-recording-cmds
Aus VDR Wiki
(Unterschied zwischen Versionen)
K (obsolete) |
K (→Bsp (sharemarks)) |
||
Zeile 94: | Zeile 94: | ||
</pre> | </pre> | ||
}} | }} | ||
+ | |||
+ | ==Bsp ({edited,before,after}-userdev.cmd)== | ||
+ | '''1''' = Führt, Benutzerdefinierte Befehle aus, welche in '''EXEC{B,A,E}''' hinterlegt werden können. | ||
+ | |||
+ | {{Box Datei| ../recording-cmds/{edited,before,after}-userdev.cmd | ||
+ | <pre> | ||
+ | #!/bin/sh | ||
+ | # | ||
+ | # example wrapper script | ||
+ | |||
+ | START="0" | ||
+ | ENTRY=$"0,1:User-defined" | ||
+ | CHECK=$(:) | ||
+ | |||
+ | EXECB="" | ||
+ | EXECA="" | ||
+ | EXECE="" | ||
+ | |||
+ | case $0 in | ||
+ | *before-*) | ||
+ | if [ -n "$EXECB" ] ; then | ||
+ | logit $0 "EXEC -> $EXECB $2" | ||
+ | screen -dm sh -c "$EXECB \"$2\"" | ||
+ | fi | ||
+ | ;; | ||
+ | *after-*) | ||
+ | if [ -n "$EXECA" ] ; then | ||
+ | logit $0 "EXEC -> $EXECA $2" | ||
+ | screen -dm sh -c "$EXECA \"$2\"" | ||
+ | fi | ||
+ | ;; | ||
+ | *edited-*) | ||
+ | if [ -n "$EXECE" ] ; then | ||
+ | logit $0 "EXEC -> $EXECE $2" | ||
+ | screen -dm sh -c "$EXECE \"$2\"" | ||
+ | fi | ||
+ | ;; | ||
+ | esac | ||
+ | </pre> | ||
+ | }} | ||
+ | |||
[[Kategorie:Installscript]] | [[Kategorie:Installscript]] |
Version vom 7. November 2007, 06:16 Uhr
Inhaltsverzeichnis |
Beschreibung
In ../recording-cmds befinden sich Scripte, welche vor / nach / schnitt einer Aufnahme ausgeführt werden.
Format (Datei):
after-<NAME>.cmd before-<NAME>.cmd edited-<NAME>.cmd
Format (Head):
START="0" # 0 = inactiv, 1 = activ, 2 = + Option ENTRY=$"0,2:Bechreibung" # eintrag für das admin-plugin <choices>:<description> CHECK=$(test xxx) # tests
Das ganze kann im admin-plugin eingestellt werden. (0 = inactiv, 1 = activ, 2 = + Option)
Alles weitere sollte im syslog ersichtlich sein. (vorrausgesetzt $VDR_LOG -gt 0)
START='0' -> ../recording-cmds/before-clipinc.cmd START='1' -> ../recording-cmds/before-noad.cmd START='2' -> ../recording-cmds/before-sharemarks.cmd
Bsp (noad)
1 = Nach einer Aufnahme 2 = Online mode
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,2:Noad (0=off,1=on,2=online mode)" CHECK=$(which noad) # set the online-mode here # 1 means online for live-recording only # 2 means online for every recording ONLINEMODE="1" # set additional args for every call here here ADDOPTS="--ac3 --overlap --jumplogo --comments --statisticfile=/var/log/vdr/noad.log" # the maximum amount of virtual memory available to the shell MAXSIZE="2000" case $0 in *before-*) case $START in 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS --online=$ONLINEMODE "$2" ;; *) logit $0 "OFF -> no online mode" ;; esac ;; *after-*) case $START in 1) logit $0 "EXEC -> $CHECK $1 $ADDOPTS $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS "$2" ;; 2) logit $0 "EXEC -> $CHECK $1 $ADDOPTS --online=$ONLINEMODE $2" ulimit -v $MAXSIZE noad $1 $ADDOPTS --online=$ONLINEMODE "$2" ;; esac ;; esac fi
1 = Upload der Marken nach dem Schnitt
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,1:Sharemarks, upload after cut" CHECK=$(which marks2pts) logit $0 "EXEC -> $CHECK -upload $1 $2" marks2pts --non-interactive --upload $1 "$2"
Bsp ({edited,before,after}-userdev.cmd)
1 = Führt, Benutzerdefinierte Befehle aus, welche in EXEC{B,A,E} hinterlegt werden können.
../recording-cmds/{edited,before,after}-userdev.cmd
#!/bin/sh # # example wrapper script START="0" ENTRY=$"0,1:User-defined" CHECK=$(:) EXECB="" EXECA="" EXECE="" case $0 in *before-*) if [ -n "$EXECB" ] ; then logit $0 "EXEC -> $EXECB $2" screen -dm sh -c "$EXECB \"$2\"" fi ;; *after-*) if [ -n "$EXECA" ] ; then logit $0 "EXEC -> $EXECA $2" screen -dm sh -c "$EXECA \"$2\"" fi ;; *edited-*) if [ -n "$EXECE" ] ; then logit $0 "EXEC -> $EXECE $2" screen -dm sh -c "$EXECE \"$2\"" fi ;; esac
{{{2}}}