1
0

latin, stow, make pretty

This commit is contained in:
dtb 2022-11-04 17:05:52 -04:00
parent 6f12aa0972
commit 885e6c199d

View File

@ -20,6 +20,13 @@ list_channels(){
done done
} }
latin(){
while str isvalue "$1"
do xq '.feed.pig' <"$1"
shift
done
}
stow(){ stow(){
while str isvalue "$1" while str isvalue "$1"
do pig_fetch "$1" | xq -x "$( do pig_fetch "$1" | xq -x "$(
@ -64,7 +71,13 @@ list_videos) # do something with youtube-dl?
'reduce .feed.entry[] as $item ( 'reduce .feed.entry[] as $item (
{}; {};
. + { ($item.link."@href"): $item.title } . + { ($item.link."@href"): $item.title }
)' )' \
| sed \
-e '1d' \
-e '$d' \
-e 's/\": \"/ /g' \
-e 's/^ \"//g' \
-e 's/\"\,$//g' # this is really hacky
;; ;;
listen) listen)
str isvalue "$2" \ str isvalue "$2" \