summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-1113-1030
blob: 25e5de5e74aa749f81bd88e72d2bc50596a17a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# PlanetRadio-Playlist
# $1 = outfile

### Variabel
Name="planet radio [www.planetradio.de]"
### 

# get...
wget -q --tries=1 --timeout=10 -O /tmp/playlist "http://www.planetradio.de/p_mt.php"

# Artist/Title
all=`grep -A1 'die letzten 3 tracks' /tmp/playlist`
title=${all/*$'<table><tr><td>'????????????????????/}; title=${title/$'<'\/'td>'*/}
artist=${all//*$'td><td>'/}; artist=${artist/$'<'\/'td>'*/}

# write...
if [ $1 ]; then
	echo $Name    > $1
	echo $artist >> $1
	echo $title  >> $1
else
	echo "$Name: Interpret/Titel =  $artist / $title"
fi