summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-15027-5120
blob: bac3bb26f6bed1914f3cb91ff3de4185c7be68bf (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
25
26
27
#!/bin/bash
# Truckradio-Playlist
# $1 = outfile

### Variabel
Name="Truckradio [truckradio.de]"
### 

# get...
wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://truckradio.de/truckradio.php"

# Artist/Title
artist=`grep -A1 '>Was läuft gerade:' /tmp/playlist`
artist=${artist/*$'<strong>'/}; artist=${artist/$'<BR>'*/}
title=`grep -A1 '>Was l&auml;uft gerade:' /tmp/playlist`
title=${title/*$'<BR>'/}; title=${title/$'<'\/'strong>'*/}
# temp. no Info
artist=${artist:='---'}; titel=${title:='---'}

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