diff options
Diffstat (limited to 'config/scripts/radioinfo-1113-354.utf8')
-rwxr-xr-x | config/scripts/radioinfo-1113-354.utf8 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/config/scripts/radioinfo-1113-354.utf8 b/config/scripts/radioinfo-1113-354.utf8 new file mode 100755 index 0000000..00a214b --- /dev/null +++ b/config/scripts/radioinfo-1113-354.utf8 @@ -0,0 +1,27 @@ +#!/bin/bash +# ffn digital-Playlist +# $1 = outfile + +### Variabel +Name="ffn digital [www.ffn.de]" +### + +# get... +wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.ffn.de/musik/playlist.html" +# 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 |