Overview #
Newsboat is a Linux terminal application which, when configured as described in this post, allows one to listen to podcasts and watch YouTube videos.
YouTube Video #
macro v set browser “setsid -f mpv -fs –really-quiet –no-terminal %u” ; open-in-browser ; set browser “/usr/bin/w3m %u”
Podcast #
macro p pipe-to “/home/karmst/scripts/nb_podcast.sh”;
nb_podcast.sh #
#!/usr/bin/env bash
while read line; do
me=$(echo $line)
if [[ "$me" =~ ^Podcast\ Download.+ ]]; then
url=$(echo "$me" | cut -d ' ' -f 4)
type=$(echo "$me" | cut -d ' ' -f 6)
echo "$type : $(date) => $url" >> /home/karmst/.config/newsboat/podcasts.txt
if [[ "$type" =~ ^video ]]; then
dunstify "Playing Video : $url"
mpv -fs --really-quiet --no-terminal $url
else
dunstify "Playing Audio : $url"
mpc add $url
mpc play
fi
fi
done