updates for hiby

This commit is contained in:
Rudis Muiznieks 2023-11-06 13:26:22 -06:00
parent e73af22b85
commit 1ed50a76c5
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
3 changed files with 36 additions and 1 deletions

22
greg/greg-dl.sh Executable file
View File

@ -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

12
greg/greg.conf Normal file
View File

@ -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

View File

@ -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'