Advertisement
naik007

Loungeradio for conky

Aug 21st, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. #!/bin/bash
  2. #pulling info from loung-radio.com for conky
  3. #2013 by nlinedesignz@web.de
  4. #call like ${execi 13 /path/to/loungradio.sh}
  5. #add ${image ~/.loungeradio -p xx,yy -s 123x123} for albumart
  6.  
  7. wget http://www.lounge-radio.com/code/pushed_files/now.html -O ~/loungeradio.html >/dev/null 2>&1 &&
  8.  
  9. artist=$(awk '/id="artist"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
  10. album=$(awk '/id="album"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
  11. track=$(awk '/id="track"/{getline; print}' ~/loungeradio.html | sed "s/<div>\|<\/div>//g")
  12.  
  13. wget "http://www.lounge-radio.com/code/pushed_files/$(awk '/id="covercontainer"/{print}' ~/loungeradio.html | sed -r 's/.*src="(.*)" width=.*/\1/')" -O ~/.loungeradio >/dev/null 2>&1 &&
  14.  
  15. echo 'Artist:' $artist;
  16. echo 'Track:' $track;
  17. echo 'Album:' $album;
  18.  
  19. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement