diff options
Diffstat (limited to 'config/scripts/radioinfo-1113-1036')
-rwxr-xr-x | config/scripts/radioinfo-1113-1036 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/scripts/radioinfo-1113-1036 b/config/scripts/radioinfo-1113-1036 new file mode 100755 index 0000000..d58eccd --- /dev/null +++ b/config/scripts/radioinfo-1113-1036 @@ -0,0 +1,25 @@ +#!/bin/bash +# harmony.fm-Playlist +# $1 = outfile + +### Variabel +Name="harmony.fm [www.harmonyfm.de]" +### + +# get... +wget -q --tries=2 --timeout=5 -O /tmp/playlist.utf8 "http://www.harmonyfm.de/index.php" +iconv -c -s -f UTF8 -t ISO8859-1 /tmp/playlist.utf8 -o /tmp/playlist + +# Artist/Title +all=`grep -A6 'id="channelOnAir"' /tmp/playlist` +artist=${all//*$'<p>'/}; artist=${artist/$' mit '*/} +title=${all//*$' mit '/}; title=${title/$'<'\/'p>'*/} + +# write... +if [ $1 ]; then + echo $Name > $1 + echo $artist >> $1 + echo $title >> $1 +else + echo "$Name: Interpret/Titel = $artist / $title" +fi |