summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-1113-353
diff options
context:
space:
mode:
Diffstat (limited to 'config/scripts/radioinfo-1113-353')
-rwxr-xr-xconfig/scripts/radioinfo-1113-35327
1 files changed, 27 insertions, 0 deletions
diff --git a/config/scripts/radioinfo-1113-353 b/config/scripts/radioinfo-1113-353
new file mode 100755
index 0000000..7957b1e
--- /dev/null
+++ b/config/scripts/radioinfo-1113-353
@@ -0,0 +1,27 @@
+#!/bin/bash
+# radio top40-Playlist
+# $1 = outfile
+
+### Variabel
+Name="radio top40 [www.radiotop40.de]"
+###
+
+# get...
+wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.radiotop40.de/titel.php"
+
+# Artist/Title
+artist=`grep -A6 '<body' /tmp/playlist`
+artist=${artist/*$'">'/}; artist=${artist/$' - '*/}
+title=`grep -A6 '<body' /tmp/playlist`
+title=${title/*$' - '/}; title=${title/$'<'\/'td>'*/}
+# 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