Last active
December 24, 2015 20:59
-
-
Save dill/6861606 to your computer and use it in GitHub Desktop.
alarm clock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# alarm clock script | |
# | |
# requires: get-iplayer | |
# git clone [email protected]:dinkypumpkin/get_iplayer.git | |
# get_iplayer --prefs-add --rtmp-tv-opts="--swfVfy=http://www.bbc.co.uk/emp/releases/iplayer/revisions/617463_618125_4/617463_618125_4_emp.swf" | |
# need to install rtmpdump | |
# get latest get_iplayer | |
cd get_iplayer | |
git pull | |
cd .. | |
# delete previos programmes | |
rm -rf flvdir | |
mkdir flvdir | |
# set the programme number for the last episode | |
OUT=$(get_iplayer/get_iplayer --type radio "Today" | tail -n 3 | head -n 1 | sed 's/\(.*\):.*/\1/g') | |
# check that worked | |
#echo $OUT | |
get_iplayer/get_iplayer --get $OUT -o flvdir | |
# play that | |
mplayer flvdir/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment