summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-1115-433
blob: 952cd51e0e7d01ac619ac913581f6a0acc2a3571 (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
# OE3-Playlist
# $1 = outfile

### Variabel
Name="OE3 [oe3.ORF.at]"
### 

# get...
wget -q --tries=1 --timeout=10 -O /tmp/playlist "http://solutions.orf.at/orf/hitservice/index.cgi?view=tracklist"

# Artist/Title
title=`grep -A2 'class="playlisttop"' /tmp/playlist`
title=${title/*$'<b>'/}; title=${title/$'<'\/'b>'*/}
artist=`grep -A4 'class="playlisttop"' /tmp/playlist`
artist=${artist/*$'   '/}
# 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