Remove sfeed script deprecated by sfeed_curses and twitch
This commit is contained in:
parent
e7a3111714
commit
cb9b0d755d
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
set -e
|
|
||||||
feedpath=~/.sfeed/feeds
|
|
||||||
zmodload zsh/datetime
|
|
||||||
typeset -A gelems
|
|
||||||
for f in $feedpath/YouTube\ -\ *; do
|
|
||||||
IFS=$'\n'
|
|
||||||
fcont=($(< $f))
|
|
||||||
for i in {1..5}; do
|
|
||||||
elems=(${(ps.\t.)fcont[$i]})
|
|
||||||
if [ "${#elems}" -gt 0 ]; then
|
|
||||||
tmp="$(strftime '%F %T' ${elems[1]}) ${(l:24:: :)elems[7]} - ${elems[2]}"
|
|
||||||
gelems[${elems[3]}]="${tmp}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
res="$(print -l ${(nO)gelems} | dmenu -l 35 -p 'Video')"
|
|
||||||
for k v in ${(kv)gelems}; do # This could be done with reverse subscripts but some characters mess it up...
|
|
||||||
[[ "$v" == "$res" ]] && exec mpv --profile=v "$k"
|
|
||||||
done
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
source ~/.config/twitch-subs
|
|
||||||
cachefile=~/.cache/twitch
|
|
||||||
LIST=()
|
|
||||||
|
|
||||||
if [[ "$1" == "fetch" ]]; then
|
|
||||||
for cur in $SUBSCRIPTIONS; do
|
|
||||||
<<< "Fetching twitch.tv/$cur" >&2
|
|
||||||
desc="$(youtube-dl --get-description "https://twitch.tv/$cur" 2>/dev/null)"
|
|
||||||
if [ -z "$desc" ]; then
|
|
||||||
<<< "$cur is offline." >&2
|
|
||||||
else
|
|
||||||
LIST+=("$cur | $desc")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
print -l $LIST > $cachefile
|
|
||||||
else
|
|
||||||
list="$(< $cachefile)"
|
|
||||||
[ -z "$cachefile" ] && return
|
|
||||||
res="$(dmenu -l 20 <<< $list)"
|
|
||||||
res="${res%% | *}"
|
|
||||||
[ -z "$res" ] && return
|
|
||||||
mpv --profile=v "https://twitch.tv/$res"
|
|
||||||
fi
|
|
Loading…
Reference in New Issue