summaryrefslogtreecommitdiff
path: root/config/scripts/radioinfo-8500-214
blob: 87a11c840579efc5ebd53cc35830f81de8b472fb (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
#!/bin/bash
# SRG-DRS Virus-Playlist
# $1 = outfile

### Variabel
Name="SRG-DRS Virus [virus.ch]"
###

# get.., schnapp dir den neusten Eintrag aus der Liste; schneide ihn zu auf "titel von artist"
all="`wget --quiet --tries=2 --timeout=5 -O - http://virus.ch/virus/ticker | grep -m1 date | cut -d '>' -f5 | cut -d '<' -f1`"

# Titel, Artist
title=${all/$' von '*/}
artist=${all/*$' von '/}
# temp. no Info
artist=${artist:='---'}; title=${title:='---'}

# write...
if [ $1 ]; then
        echo "$Name" > $1
        echo "$Song" >> $1
else
        echo "$Name: Interpret/Titel =  $artist / $title"
fi