Skip to content

Instantly share code, notes, and snippets.

@dill
Last active December 24, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dill/6861606 to your computer and use it in GitHub Desktop.
Save dill/6861606 to your computer and use it in GitHub Desktop.
alarm clock
#!/bin/bash
# alarm clock script
#
# requires: get-iplayer
# git clone git@github.com: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