From 1ed50a76c55a0acd2f3cd50a632a9584f8f8b6e9 Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Mon, 6 Nov 2023 13:26:22 -0600 Subject: [PATCH] updates for hiby --- greg/greg-dl.sh | 22 ++++++++++++++++++++++ greg/greg.conf | 12 ++++++++++++ zsh/zalias-borges | 3 ++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 greg/greg-dl.sh create mode 100644 greg/greg.conf diff --git a/greg/greg-dl.sh b/greg/greg-dl.sh new file mode 100755 index 0000000..8351010 --- /dev/null +++ b/greg/greg-dl.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +outfile=$1 +uri=$(perl -MURI::Escape -e 'print uri_escape shift, , q{^A-Za-z0-9\-._~/:}' -- "$2") +podname=$3 +epname=$4 +year=$(awk -F- '{ print $1 }' <<<"$5") + +if [ ! -f "$outfile" ]; then + # download the episode + curl -sSLo "$outfile" "$uri" + + # clear all tags from file + id3 -1 --delete "$outfile" + id3 -2 --delete "$outfile" + id3 -3 --delete "$outfile" + + # write podcast tags + id3 -2 --genre "Podcast" --year "$year" --album "Podcast: $podname" --artist "Podcast" --frame=TPE2 "Podcast" --title "$epname" "$outfile" +fi diff --git a/greg/greg.conf b/greg/greg.conf new file mode 100644 index 0000000..069c1fb --- /dev/null +++ b/greg/greg.conf @@ -0,0 +1,12 @@ +[DEFAULT] +Data directory = /mnt/hiby/.greg +Download directory = /mnt/hiby/PODCASTS +Create subdirectory = yes +subdirectory_name = {filename_podcasttitle} +Tag = no +firstsync = all +mime = audio +date_format = %%Y-%%m-%%d +downloadhandler = /home/rudism/skynet/greg/greg-dl.sh {directory}/{date}_{filename_title}.mp3 {link} {podcasttitle} {title} {date} +ignoreenclosures = no +notype = no diff --git a/zsh/zalias-borges b/zsh/zalias-borges index 3cde2ef..2714b25 100644 --- a/zsh/zalias-borges +++ b/zsh/zalias-borges @@ -5,6 +5,7 @@ hash -d r2=/mnt/external/rudism hash -d api=/home/rudism/mri/cosmic/api hash -d gql=/home/rudism/mri/cosmic/graphql-server hash -d as2=/home/rudism/mri/appdat/as2 +hash -d oot=/home/rudism/mri/cosmic/nasa/oot/api hash -d a=/mnt/agrajag hash -d b=/mnt/beeblebrox @@ -12,7 +13,7 @@ hash -d b=/mnt/beeblebrox alias nasavpn='/home/rudism/src/nasavpn/nasavpn' alias dockerrm='docker stop $(docker ps -aq); docker rm $(docker ps -aq); docker system prune -f' alias webcamfix='sudo modprobe v4l2loopback devices=1 video_nr=9 card_label=VirtualCam exclusive_caps=1 && ffmpeg -f video4linux2 -framerate 25 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -f v4l2 -pix_fmt yuv420p /dev/video9; sudo rmmod v4l2loopback' -alias fiio='sudo mount -o uid=rudism,gid=rudism UUID=3317-74BF /mnt/fiio' +alias hiby='sudo mount -o uid=rudism,gid=rudism UUID=3317-74BF /mnt/hiby' alias syncmusic='rsync -e ssh -av --size-only --ignore-times --no-perms --no-owner --no-group /mnt/agrajag/music/ /mnt/fiio/MUSIC' alias watchsync='watch -d grep -e Dirty: -e Writeback: /proc/meminfo'