diff --git a/.bashrc b/.bashrc index df3cd47116772e6f961f2fae87b182bab2a91596..f01fcbb91ab48cfa86d7fdf8d1f695c707bef479 100644 --- a/.bashrc +++ b/.bashrc @@ -306,11 +306,6 @@ sync_comics () { find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -exec rm -r {} + } -sync_podcasts () ( - cd || exit 1 - unison podcasts -) - temp_venv () { cdtemp venv . diff --git a/.unison/podcasts.prf b/.unison/podcasts.prf deleted file mode 100644 index b3c6ca255269702f0956f4b5cc7623709d9293c5..0000000000000000000000000000000000000000 --- a/.unison/podcasts.prf +++ /dev/null @@ -1,7 +0,0 @@ -root = Downloads/Podcasts/ -root = ssh://kodi.shore.co.il//srv/library/nimrod/Podcasts -path = . -batch = true - -#nocreation -#nodeletion diff --git a/Documents/bin/sync-podcasts b/Documents/bin/sync-podcasts new file mode 100755 index 0000000000000000000000000000000000000000..5799f01893ae45d17590514303b27c9f244ab143 --- /dev/null +++ b/Documents/bin/sync-podcasts @@ -0,0 +1,18 @@ +#!/bin/sh +set -eu + +XDG_DOWNLOAD_DIR="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}" +mkdir -p "$XDG_DOWNLOAD_DIR/Podcasts" + +exec wget \ + --continue \ + --cut-dirs=3 \ + --directory-prefix "$XDG_DOWNLOAD_DIR/Podcasts" \ + --mirror \ + --no-host-directories \ + --no-parent \ + --recursive \ + --reject '*.htm,*.html,index.htm*,robots.txt' \ + --show-progress \ + --user-agent sync-podcasts \ + https://library.shore.co.il/webdav/nimrod/Podcasts/