diff options
author | tv <root@telnet.shack> | 2010-12-28 22:14:37 +0100 |
---|---|---|
committer | tv <root@telnet.shack> | 2010-12-28 22:14:37 +0100 |
commit | 62fe6b8b456bd7c18d0b24e9d4bf2ed62c5d7d0b (patch) | |
tree | 126ff0d00fcb550fe8f8d29bddf8b1de38b91718 /modules | |
parent | 2fe9176beab260f09f75a75513d10f295b353aee (diff) |
stream: added verbose /help
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/stream | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/stream b/modules/stream index 76e86317..fa5a2d6e 100755 --- a/modules/stream +++ b/modules/stream @@ -2,7 +2,20 @@ inputdir=$HOME/noise/streams case "$1" in (--help) - echo "play an audio stream" ;; + if echo "$0 $*" | grep -q '[[:space:]]--verbose\>'; then + echo -e "\x1B[35mtype \x1B[32m/espeak off \x1B[35mto turn stream off\x1B[m" + for i in `ls $inputdir` ; do + filename="$inputdir/$i" + shortcut=`xmlstarlet sel -t -v /station/@shortcut "$inputdir/$i"` + title=`xmlstarlet sel -t -v /station/@title "$inputdir/$i"` + topic=`xmlstarlet sel -t -v /station/@topic "$inputdir/$i"` + stream=`xmlstarlet sel -t -v /station/@stream "$inputdir/$i"` + echo -e "\x1B[35mtype \x1B[32m/espeak $shortcut \x1B[35mfor $topic\x1B[m" + done + else + echo "play an audio stream" + fi + ;; (*) exec 2>&1 ffs='xml' |