Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Quick'n'dirty tuner script
- To: linux-dvb@linuxtv.org
- Subject: [linux-dvb] Quick'n'dirty tuner script
- From: Brad Campbell <brad@wasp.net.au>
- Date: Mon, 06 Oct 2003 14:32:40 +0400
- Content-transfer-encoding: 7bit
- Content-type: text/plain; charset=us-ascii; format=flowed
- Sender: linux-dvb-bounce@linuxtv.org
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3
Hi all'yall,
Not having any way to get vdr running on my PC, with only one cheap and
nasty Sat card, I quickly hacked up a script to parse my
.szap/channels.conf file and present me with a list of channels, then to
play it for me when I select one.
May be of use to someone.
<Warning> I'm not any good with sed or regex's so the following script
may cause dizziness or nausea </Warning>
Oh yeah, and my screen is 48x128 and it's hardcoded into the script.
Change it for your screen settings. I found LINES & COLUMNS were not
easily accessible from inside the script. (I'm not a bash guru either)
#!/bin/sh
SZAP=/home/brad/dvb/DVB/apps/szap/szap
DVB=/home/brad/dvb/dvbstream/dvbstream
CHANFILE=/root/.szap/channels.conf
let count=0
TMP1=""
for i in `cat $CHANFILE | cut -f1 -d: | sed 's/\ /_/g;s/^/"/;s/$/"/'` ;
do TMP1="$TMP1 $i $count";
echo $i;
let count++ ;
done
#echo $TMP1
CHAN=`dialog --stdout --menu "Sat Channel Menu" 48 128 40 $TMP1`
reset
CHAN2=`echo $CHAN | sed 's/_/ /g;s/"//g'`
echo $CHAN2
TMP1=`cat $CHANFILE | grep "$CHAN2"`
echo $TMP1
$SZAP -c $CHANFILE -x "$CHAN2"
VID=`echo $TMP1 | cut -f6 -d:`
AID=`echo $TMP1 | cut -f7 -d:`
echo $VID $AID
$DVB -o -ps $VID $AID | mplayer -vo fbdev \
-vop scale=1024:768,pp=0x20000 -
Brad
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index