pub / podboat-transfer

Script(s) to manage and transfer podcast episodes via podboat
git clone src.jayvii.de/pub/podboat-transfer.git
Home | Log | Files | Exports | Refs | RSS

commit b6ade4b7e54f17bc70f07890a4e3a5a2c4fdd6fe
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Mon, 30 Mar 2026 08:32:44 +0200

feat: add initial script

Diffstat:
Atransfer_podcasts.sh | 46++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+), 0 deletions(-)

diff --git a/transfer_podcasts.sh b/transfer_podcasts.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# download all podcasts +echo "Downloading Podcast Episodes in the Queue..." +podboat -a + +# Adjust ID3 Tags from all downloaded files; +# add the "Podcast" Pseudo-Artist +# add the Podcast Name as Pseudo-Album +# add the file / episode name as track title +echo "Adjust ID3 tags..." +find ~/Podcasts/ -type f -print | while read file; do + podcast=$(basename "`dirname "${file}"`") + episode=$(basename "${file}") + eyeD3 --quiet --preserve-file-times \ + --artist "Podcast" \ + --album "$podcast" \ + --title "$episode" \ + "${file}" > /dev/null +done + +# transfer all files to MP3 player +target="/media/$USER/M10" +if [[ ! -d $target ]]; then + + # change to podcast directory + cd ~/Podcasts/ + + # cycle through each media file one-by-one + echo "Send Downloaded Episodes to ${target}/PODCASTS/ ..." + find ./ -type f -print | while read file; do + + # clean up the filename for allowed characters + file_clean=$(echo ${file} | sed -e 's/[^a-zA-Z0-9\_\-\.\ \/]/_/g'); + + mkdir -p "${target}/PODCASTS/$(dirname "${file_clean}")" && \ + cp --verbose --update=none --no-clobber \ + "${file}" "${target}/PODCASTS/${file_clean}" + + done + +fi + +echo "Done! Enjoy listening!" + +# EOF