You are not logged in.
Pages: 1
Hi everyone,
I've put together a small CLI tool to search shoutcast.com radio stations. I use it in verbose mode to browse around, specifically for artists that I like. In normal mode, I use it do automate station selection. For example, I start my day with the following command to launch a random station with decent quality playing Chill music.
$ shoutcast-search -n 1 -g chill -l ">50" -b ">127" -r | xargs vlc
Partly as a learning experience, I've added the shoutcast-search package to AUR. Not only is this my first AUR package, it is also my first source code contribution to the Open Source world. I appreciate any comments or pointers.
See man page for documentation. Source code at github.
Cheers,
halhen
PS
Also first time poster, though long time lurker. Lots of firsts today. Yay!
DS
Offline
0.2 is out. You now have more options to sort and prune the results to, for example, get the top ten stations ordered by bitrate. I also added a quick write-up on what it does and how it can be used on http://code.k2h.se.
Tip for using: add the following function to .bashrc (change to fit your player)
radio() {
killall mpg123; shoutcast-search -n 1 -t mpeg -b ">63" --sort=ln10r $* | xargs mpg123 -q -@ &
}
For example, to start a random top-10 chill stream:
$ radio chill
Comments are welcome.
Last edited by halhen (2009-04-12 18:25:09)
Offline
0.3 is out and is in AUR. Not a huge list of news, but some; partly based on requests:
* separated library-friendly parts to a python module. Will end up on PyPI, possibly tonight.
* --list-genres option to fetch a list of musical genres according to shoutcast.com.
* -f FORMAT, --format=FORMAT lets you specify what information to print and how, which can be quite useful. For example
shoutcast-search -n 3 -f "%l\t%s" country
gives you a list of the number of listeners and names of the three top country stations:
2390 181.FM - Kickin' Country - Today's BEST Country!
1001 1.FM - Absolutely Country Hits
753 .977 The Country Channel
Documentation and examples on http://code.k2h.se.
I'm beginning to feel quite happy with this tool now, or am at least running out of ideas of what to add. I've been thinking about some interactive front-end that would let you scroll through the found list and press enter on the one you want to listen to. Would that be useful to anyone?
Please keep sending feature requests / bug reports or just drop me a line to let me know you use it.
Last edited by halhen (2009-04-15 21:06:35)
Offline
i like it ... i was looking something like this ... and already using it ...
radio() {
shoutcast-search -n 1 -t mpeg -b ">63" --sort=ln10r $* | xargs wget -q -O .shoutcast.pls && mocp -T wujaklija-theme /home/wuja/.shoutcast.pls
}
Offline
This is a great little app... it does what the name suggests. There don't seem to be many other Shoutcast search apps/plugins. I wish it could be integrated in Sonata/mpc. B.t.w. the PKGBUILD is missing a dependency: makedepends="setuptools"
Last edited by rwd (2009-08-08 22:33:47)
Offline
Very useful, thank you!
I also have the desire to integrate this somehow into mpd, especially Sonata, any ideas?
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
Very useful, thank you!
I also have the desire to integrate this somehow into mpd, especially Sonata, any ideas?
Only this idea :
in .bashrc
radio() {
shoutcast-search -n 1 -t mpeg -b ">63" --sort=ln10r $* | xargs wget -q -O .shoutcast.pls && ~/.skripte/./mpc-radio.sh ~/.shoutcast.pls
}
where mpc-radio.sh is :
#!/bin/bash
export MPD_HOST=127.0.0.1
export MPD_PORT=6600
if echo $1 | grep -i pls; then
mpc clear
grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add
mpc play
elif echo $1 | grep -i m3u; then
mpc clear
cat $1 | mpc add
mpc play
else
mpc clear
echo $1 | mpc add
mpc play
fi
exit
you need to have mpc installed...
so just type in terminal , for examle :radio rock
Offline
SanskritFritz wrote:Very useful, thank you!
I also have the desire to integrate this somehow into mpd, especially Sonata, any ideas?
Only this idea :
in .bashrcradio() { shoutcast-search -n 1 -t mpeg -b ">63" --sort=ln10r $* | xargs wget -q -O .shoutcast.pls && ~/.skripte/./mpc-radio.sh ~/.shoutcast.pls }
where mpc-radio.sh is :
#!/bin/bash export MPD_HOST=127.0.0.1 export MPD_PORT=6600 if echo $1 | grep -i pls; then mpc clear grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add mpc play elif echo $1 | grep -i m3u; then mpc clear cat $1 | mpc add mpc play else mpc clear echo $1 | mpc add mpc play fi exit
you need to have mpc installed...
so just type in terminal , for examle :radio rock
this is very useful, you could clean it up a bit though:
mpc clear
case $1 in
*.pls) grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add ;;
*.m3u) cat $1 | mpc add ;;
*) echo $1 | mpc add ;;
esac
mpc play
just a suggestion, obviously if it works it works .
//github/
Offline
Nice idea, thanks!
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
Awesome program, exactly what I searched for. Thank you for that.
Try walking in my shoes.
Offline
Here is 5 cents:
radio() {
mpc clear; shoutcast-search -n 1 -g "$1" -t mpeg -b ">63" --sort=ln10r $* | xargs w3m -dump | grep -i file | cut -d'=' -f2 |head -n 1 |xargs mpc add; mpc toggle
}
It adds radio stream of the requested genre to the mpd playlist and plays it.
Offline
Thanks you man
Offline
Due to the new AOL licensing terms for the SHOUTcast service, I've decided to put shoutcast-search on hold in its current, non-functioning state. I encourage you to let AOL know what you think about this.
Offline
\would it be an idea to turn it into an icecast search tool?
Offline
Pages: 1