small changes
This commit is contained in:
parent
11d85172f5
commit
128198e0b5
1
Makefile
1
Makefile
|
@ -15,7 +15,6 @@ sh:
|
||||||
cp -f sh/trss-yt-id $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/trss-yt-id $(DESTDIR)$(PREFIX)/bin
|
||||||
cp -f sh/disp $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/disp $(DESTDIR)$(PREFIX)/bin
|
||||||
cp -f sh/wallpaper $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/wallpaper $(DESTDIR)$(PREFIX)/bin
|
||||||
cp -f sh/yt $(DESTDIR)$(PREFIX)/bin
|
|
||||||
cp -f sh/connect $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/connect $(DESTDIR)$(PREFIX)/bin
|
||||||
cp -f sh/nws $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/nws $(DESTDIR)$(PREFIX)/bin
|
||||||
cp -f sh/vol $(DESTDIR)$(PREFIX)/bin
|
cp -f sh/vol $(DESTDIR)$(PREFIX)/bin
|
||||||
|
|
|
@ -21,8 +21,6 @@ open all feeds whose titles contain text as specified by an argument in 'lynx'
|
||||||
this script is designed to allow one to obtain an rss feed for the uploads of a youtube channel. this command takes the homepage of the youtube channel in question as an argument and then returns the rss feed for that channel.
|
this script is designed to allow one to obtain an rss feed for the uploads of a youtube channel. this command takes the homepage of the youtube channel in question as an argument and then returns the rss feed for that channel.
|
||||||
|
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
- 'set' is a stub
|
|
||||||
|
|
||||||
- when in a feed, you can't cd to another directly, you must go to to the 'feed home' and then cd
|
- when in a feed, you can't cd to another directly, you must go to to the 'feed home' and then cd
|
||||||
|
|
||||||
.SH DEPENDS
|
.SH DEPENDS
|
||||||
|
|
29
sh/trss
29
sh/trss
|
@ -23,7 +23,7 @@ sync_individual () {
|
||||||
curl "$url" -so "$DATA/${1}.xml"
|
curl "$url" -so "$DATA/${1}.xml"
|
||||||
|
|
||||||
# generate sfeed formatted file
|
# generate sfeed formatted file
|
||||||
printf "> creating sfeed compound feed file for feed %s\n" "$i"
|
printf "> creating sfeed compound feed file for feed %s\n" "$1"
|
||||||
cat "$DATA/${1}.xml" | sfeed | cat - "$DATA/${1}.sfeed" | sort -u | sort -r -k 1 >> "$DATA/${1}.tmp.sfeed"
|
cat "$DATA/${1}.xml" | sfeed | cat - "$DATA/${1}.sfeed" | sort -u | sort -r -k 1 >> "$DATA/${1}.tmp.sfeed"
|
||||||
mv "$DATA/${1}.tmp.sfeed" "${DATA}/${1}.sfeed"
|
mv "$DATA/${1}.tmp.sfeed" "${DATA}/${1}.sfeed"
|
||||||
}
|
}
|
||||||
|
@ -53,8 +53,8 @@ cli_loop () {
|
||||||
"sync"*)
|
"sync"*)
|
||||||
sync_handler $input
|
sync_handler $input
|
||||||
;;
|
;;
|
||||||
"set"*)
|
"open"*)
|
||||||
set_handler $input
|
open_handler $input
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -119,8 +119,25 @@ sync_handler () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
set_handler () {
|
open_handler() {
|
||||||
printf "stub, use +x or -x to disable/enable debug output\n"
|
realargs="$(printf '%s\n' "$@" | tr '\n' ' ' | sed 's/^open //g;s/ $//g')"
|
||||||
|
[ -z "$MODE" ] && printf "couldn't find entry matching %s\n" "$realargs"
|
||||||
|
results="$(awk -F'\t' -v pat="$realargs" '$2 ~ pat { print $0 }' "$DATA/${MODE}.sfeed")"
|
||||||
|
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS="
|
||||||
|
"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
for i in $results; do
|
||||||
|
url="$(printf "%s" "$1" | awk -F'\t' '{ print $3 }')"
|
||||||
|
|
||||||
|
echo "$url"
|
||||||
|
|
||||||
|
fire "$url" &
|
||||||
|
done
|
||||||
|
set +x
|
||||||
|
IFS="$OLDIFS"
|
||||||
}
|
}
|
||||||
|
|
||||||
cat_handler () {
|
cat_handler () {
|
||||||
|
@ -138,8 +155,8 @@ cat_handler () {
|
||||||
printf "%s\n" "$entry" |
|
printf "%s\n" "$entry" |
|
||||||
sed -e 's|\\n|\n|g' -e 's|\\t|\t|g' |
|
sed -e 's|\\n|\n|g' -e 's|\\t|\t|g' |
|
||||||
lynx -stdin
|
lynx -stdin
|
||||||
|
|
||||||
done
|
done
|
||||||
|
IFS="$OLDIFS"
|
||||||
}
|
}
|
||||||
|
|
||||||
import_information
|
import_information
|
||||||
|
|
Loading…
Reference in New Issue