diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-04-11 15:31:16 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-04-11 15:31:16 +0200 |
commit | 998cd10ac2a0148052e03471d019aafdd2e14f8c (patch) | |
tree | f0b7e1bf92020f53da623b7495e2fa71591c09af | |
parent | eedd4b036bdd5f9d488ff011b7e6947ca1edf312 (diff) | |
download | pianobar-998cd10ac2a0148052e03471d019aafdd2e14f8c.tar.gz pianobar-998cd10ac2a0148052e03471d019aafdd2e14f8c.tar.bz2 pianobar-998cd10ac2a0148052e03471d019aafdd2e14f8c.zip |
New script: Add shared stations by homepage url
-rwxr-xr-x | contrib/addshared.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/addshared.sh b/contrib/addshared.sh new file mode 100755 index 0000000..246cd98 --- /dev/null +++ b/contrib/addshared.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# extract shared station id from station homepage and add it to pianobar + +ctl="$HOME/.config/pianobar/ctl" + +if [ -z "$1" ]; then + echo "Usage: `basename $0` <station url>" + exit 1 +fi + +curl -s "$1" | sed -nre "s#.*launchStationFromId\('([0-9]+)'\).*#j\1#gp" > "$ctl" + +exit 0 + |