16 lines
319 B
Bash
Executable File
16 lines
319 B
Bash
Executable File
#!/bin/zsh
|
|
|
|
source ~/.config/twitch-subs
|
|
LIST=()
|
|
|
|
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 > ~/.cache/twitch
|