diff --git a/README.md b/README.md index 0981800..1dfc07f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # multiple_scripts Multiple scripts that are useful but don't deserve their own repository. + + +# briefing.sh + +Used along with Podfox to create a daily briefing without involving +Google or Amazon or Apple. diff --git a/briefing.sh b/briefing.sh new file mode 100644 index 0000000..427abd1 --- /dev/null +++ b/briefing.sh @@ -0,0 +1,22 @@ +#!/bin/bash + + +/usr/local/bin/podfox -c ~/.podfox.json update +/usr/local/bin/podfox -c ~/.podfox.json download + +today=`date +%Y%m%d` +mkdir -p ~/briefing/$today + +#Uncomment to remove all old briefings +#rm -rf ~/briefing/* + +# Moving podcasts to central directory. +find ~/podcasts -name '*.mp3' -exec mv {} ~/briefing/$today \; + + +#https://askubuntu.com/questions/259726/how-can-i-generate-an-m3u-playlist-from-the-terminal + +# This does not seem to work with ~/ for $HOME, so I've put the full user +# path here. +playlist='/home/user/briefing/play.m3u' ; if [ -f $playlist ]; then rm $playlist ; fi ; for f in /home/steven/briefing/$today/*.mp3; do echo "$f" >> "$playlist"; done +mplayer -playlist "$playlist"