A History of the World in 100 MP3 files

Radio 4 is running a brilliant series called A History of the World in A Hundred Objects. However should you wish to download this series so you can listen to it a convenient place and time, how should you do it? Certainly not through the over-complex official website that’s for sure.

But with some shell script you can grab the MP3 files and listen to this wonderful educational series at your pleasure:

i=1
e=100
y=2010
m=1
d=18
while [ $i -le $e ]; do
  date=$(printf "%04d%02d%02d" $y $m $d)
  for x in a c; do
    for y in 1000 1005; do
      wget -nc http://downloads.bbc.co.uk/podcasts/radio4/ahow/ahow_$date-$y$x.mp3
    done
  done
  i=$(($i+1))
  d=$(($d+1))
  if [ $m -eq 1 ]; then
    endm=32
  elif [ $m -eq 2 ]; then
    endm=29
  elif [ $m -eq 3 ]; then
    endm=32
  elif [ $m -eq 4 ]; then
    endm=31
  fi
  if [ $d -eq $endm ]; then
    m=$(($m+1))
    d=1
  fi
done

Update

A reader has pointed me to the full list of MP3 (podcast) files available from the BBC.

About these ads

4 Comments

Filed under Uncategorized

4 responses to “A History of the World in 100 MP3 files

  1. Clifford Snow

    suggest change: for y in 1000 1005; do
    to: for z in 1000 1005; do

    and change
    wget -nc http://downloads.bbc.co.uk/podcasts/radio4/ahow/ahow_$date-$y$x.mp3
    wget -nc

    to

    [audio src="http://downloads.bbc.co.uk/podcasts/radio4/ahow/ahow_$date-$z$x.mp3" /]

  2. Mehdi Dogguy

    or you can try:

    wget -q -O- http://downloads.bbc.co.uk/podcasts/radio4/ahow/rss.xml | \
    xpath -q -e “//media:content” | sed -n “s/.*url=\”\([^ ]*\)\”.*/\1/pg” | wget -i -
    :)

  3. marcus nicke

    I wouldn’t know what to do with shell script but, you can subscribe on the website you provide a link to above, use itunes to manage the subscription and simply click the GET ALL button. Then sit back and wait for 100 x 7MB per episode.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s