Friday, February 23, 2018

Script to download daily Performance Today episodes

Call it whatever, such as pt.sh, and put it in cron as follows:

 $  
 0 9  * * 1-6 root  /home/pi/Programs/pt.sh  


 #!/bin/bash  
 # Hour 1  
 wget -P /mnt/usb/Music/Radio/Performance_Today/ \  
 "download.publicradio.org/performance_today/`date +%Y/%m/%d`/pt1_`date +%Y%m%d`_128.mp3"  
 # Hour 2  
 wget -P /mnt/usb/Music/Radio/Performance_Today/ \  
 "download.publicradio.org/performance_today/`date +%Y/%m/%d`/pt2_`date +%Y%m%d`_128.mp3"  

No comments: