blob: 068aeeb088d27f8e5a787a9526b7bd1b4f0a45de (
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
28
29
|
#!/bin/bash
# ffn digital-Playlist
# $1 = outfile
### Variabel
Name="ffn digital [www.ffn.de]"
###
# get...
wget -q --tries=2 --timeout=5 -O /tmp/playlist.utf8 "http://www.ffn.de/musik/playlist.html"
iconv -c -s -f UTF8 -t ISO8859-1 /tmp/playlist.utf8 -o /tmp/playlist
# grep actual song
all=`grep -A6 'wird gerade gespielt' /tmp/playlist`
# Artist/Title
artist=${all//*$'"artist">'/}; artist=${artist//$'</h3>'*/}
title=${all//*$'"title">'/}; title=${title//$'</h3>'*/}
# 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
|