Compare commits
No commits in common. "8604e6677ae35b003c9fc1d1df33244f7875f3af" and "61aa9344c1a88a580c6988633ec5a7623d652ddc" have entirely different histories.
8604e6677a
...
61aa9344c1
@ -60,35 +60,22 @@ sub_link() {
|
|||||||
|
|
||||||
list_read() {
|
list_read() {
|
||||||
VID=""
|
VID=""
|
||||||
VIDFILES=""
|
|
||||||
|
|
||||||
while read -r art; do
|
while read -r art; do
|
||||||
LINK="$(sub_link "$art")"
|
LINK="$(sub_link "$art")"
|
||||||
if [ ! -z "$(printf "%s" "$LINK" | grep 'youtube.com\|odycdn\|simplecastaudio\|podcasts\|twitch')" ]; then
|
if [ ! -z "$(printf "%s" "$LINK" | grep 'youtube.com\|odycdn\|simplecastaudio\|podcasts\|twitch')" ]; then
|
||||||
VID="$VID$LINK "
|
VID="$VID$LINK "
|
||||||
if [ -n "$VIDFILES" ]; then
|
|
||||||
VIDFILES=$(printf "%s\n%s" "$VIDFILES" "$art")
|
|
||||||
else
|
|
||||||
VIDFILES="$art"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
xdg-open $LINK 2> /dev/null &
|
xdg-open $LINK 2> /dev/null &
|
||||||
if [ -h "$art" ]; then
|
fi
|
||||||
# remove symlinks from new/
|
if [ -h "$art" ]; then
|
||||||
rm "$art"
|
# remove symlinks from new/
|
||||||
fi
|
rm "$art"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "$VID" ]; then
|
if [ -n "$VID" ]; then
|
||||||
if mpv $VID 2> /dev/null; then
|
mpv $VID 2> /dev/null &
|
||||||
printf "%s" "$VIDFILES" | xargs -d "\n" rm
|
|
||||||
else
|
|
||||||
printf "\n%s%s%s\n" \
|
|
||||||
$blue \
|
|
||||||
"mrss: Non-zero return code from mpv, not marking video files as read" \
|
|
||||||
$normal
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,24 +86,18 @@ sub_read() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub_select() {
|
sub_select() {
|
||||||
NEWARTS="$(find "$MRSS_NEWDIR" -type l)"
|
find "$MRSS_NEWDIR" -type l | (
|
||||||
TOTAL_COUNT="$(printf "%s" "$NEWARTS" | wc -l)"
|
|
||||||
printf "%s" "$NEWARTS" | (
|
|
||||||
|
|
||||||
INDEX=0
|
|
||||||
while read -r ARTICLE; do
|
while read -r ARTICLE; do
|
||||||
|
clear
|
||||||
|
|
||||||
if [ -n "$SKIPALL" ]; then
|
if [ -n "$SKIPALL" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INDEX=$((INDEX+1))
|
|
||||||
clear
|
|
||||||
|
|
||||||
DIRNAME="$(basename $(dirname "$ARTICLE"))"
|
DIRNAME="$(basename $(dirname "$ARTICLE"))"
|
||||||
TITLE="$(cat "$ARTICLE" | jq -r '.title')"
|
TITLE="$(cat "$ARTICLE" | jq -r '.title')"
|
||||||
DESC_TRUNC="$(cat "$ARTICLE" | jq -r '.description // ""' | w3m -dump -T text/html | head -n 20)"
|
DESC_TRUNC="$(cat "$ARTICLE" | jq -r '.description // ""' | w3m -dump -T text/html | head -n 20)"
|
||||||
|
|
||||||
printf "\nItem %s/%s\n" "$INDEX" "$TOTAL_COUNT"
|
|
||||||
printf "\nFeed '%s'\n" "$DIRNAME"
|
printf "\nFeed '%s'\n" "$DIRNAME"
|
||||||
printf "\n%s%s%s\n" "$blue" "$TITLE" "$normal"
|
printf "\n%s%s%s\n" "$blue" "$TITLE" "$normal"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user