Guest User

Weekly Beats Week 2 download script

a guest
Jan 16th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. # create working directory
  2. mkdir weeklybeats_download_script
  3. cd weeklybeats_download_script
  4. # retrieve RSS file
  5. wget http://weeklybeats.com/music/rss
  6. # cut out necessary info
  7. sed '3097,5936d' rss > rss1
  8. sed 's/_2_/&/w temp_mp3_links' <rss1
  9. sed 's/<title><!\[CDATA\[Week 2 - /&/w temp_titles' <rss1
  10. sed 's/\/itunes:summary/&/w temp_licenses' <rss1
  11. # clean mp3 links file
  12. sed 's/            <enclosure url=/wget /w mp3_links1' <temp_mp3_links
  13. sed 's/ type=\"audio\/mpeg\" \/>/ /w mp3_links2' <mp3_links1
  14. # clean copyright file
  15. sed 's/\]\]><\/itunes:summary>/ /w licenses1' <temp_licenses
  16. # clean song titles file
  17. sed 's/            <title><!\[CDATA\[Week 2 - /- /w titles1' <temp_titles
  18. sed 's/\]\]><\/title>/ /w titles2' <titles1
  19. # organize copyright file
  20. paste titles2 licenses1 > copyright
  21. # download mp3s
  22. chmod +x mp3_links2
  23. ./mp3_links2
  24. # delete temp files
  25. rm rss rss1 temp_* mp3_links* licenses1 titles*
  26. # package into zip file
  27. zip weeklybeats.zip *
  28. mv weeklybeats.zip ..
  29. # delete other stuff
  30. cd ..
  31. rm -rf weeklybeats_download_script
Add Comment
Please, Sign In to add comment