Skip to content

Instantly share code, notes, and snippets.

@carcam
Created May 20, 2015 09:10
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 carcam/8cc32389a181d2c40ef7 to your computer and use it in GitHub Desktop.
Save carcam/8cc32389a181d2c40ef7 to your computer and use it in GitHub Desktop.
Get Joomgouts MP3
youtube-dl --playlist-start 53 --dateafter `date -v-monday +%Y%m%d` -x --audio-format mp3 http://www.youtube.com/playlist?list=PLIcuwIrm4rKeCBZYvueddKTA4yFcHsQqZ
count=`ls -1 *.mp3 2>/dev/null | wc -l`
if [ $count != 0 ]
then
mensaje="¡Hay un nuevo programa de Joomgouts listo!"
else
mensaje="Esta semana no hay programa de Joomgouts :("
fi
#Display Apple notification: http://apple.stackexchange.com/questions/57412/how-can-i-trigger-a-notification-center-notification-from-an-applescript-or-shel
osascript -e "display notification \"$mensaje\" with title \"Joomgouts\" sound name \"Glass\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment