summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-1093-851
blob: 0b74297fb136b580ee17e1a3cc3f36291aeea40f (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
#!/bin/bash
# Fritz-Playlist
# $1 = outfile

### Variabel
Name="Fritz [www.fritz.de]"
### 

# get...
wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.fritz.de/ds/ds.html"

# Artist/Title
all=`grep -A0 'on air Titel:' /tmp/playlist`
artist=${all/*$'<span class='\"'titelanzeige'\"'>'/}; artist=${artist/$' - '*/}
title=${all//*$' - '/}; title=${title/$'<'\/'span>'*/}
# 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