Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create working directory
- mkdir weeklybeats_download_script
- cd weeklybeats_download_script
- # retrieve RSS file
- wget http://weeklybeats.com/music/rss
- # cut out necessary info
- sed '3097,5936d' rss > rss1
- sed 's/_2_/&/w temp_mp3_links' <rss1
- sed 's/<title><!\[CDATA\[Week 2 - /&/w temp_titles' <rss1
- sed 's/\/itunes:summary/&/w temp_licenses' <rss1
- # clean mp3 links file
- sed 's/ <enclosure url=/wget /w mp3_links1' <temp_mp3_links
- sed 's/ type=\"audio\/mpeg\" \/>/ /w mp3_links2' <mp3_links1
- # clean copyright file
- sed 's/\]\]><\/itunes:summary>/ /w licenses1' <temp_licenses
- # clean song titles file
- sed 's/ <title><!\[CDATA\[Week 2 - /- /w titles1' <temp_titles
- sed 's/\]\]><\/title>/ /w titles2' <titles1
- # organize copyright file
- paste titles2 licenses1 > copyright
- # download mp3s
- chmod +x mp3_links2
- ./mp3_links2
- # delete temp files
- rm rss rss1 temp_* mp3_links* licenses1 titles*
- # package into zip file
- zip weeklybeats.zip *
- mv weeklybeats.zip ..
- # delete other stuff
- cd ..
- rm -rf weeklybeats_download_script
Add Comment
Please, Sign In to add comment