~phate/lobsters

b576d244056c88dd5dc47de22ec3c10a28e60d5c — ValleyKnight 4 months ago f584492
some improvements
1 files changed, 4 insertions(+), 4 deletions(-)

M lobsters
M lobsters => lobsters +4 -4
@@ 4,15 4,15 @@
## Created by -- Phate6660 (phate)

json="$(curl -sSL https://lobste.rs/newest.json)"
titles="$(echo "$json" | jq '.[].title')"
titles="$(jq '.[].title' <<< "$json")"
titles="$(sed -e 's/^"//' -e 's/"$//' <<< "$titles")"
urls="$(echo "$json" | jq '.[].comments_url')"
urls="$(jq '.[].comments_url' <<< "$json")"

urls_space_delimited="$(echo "$urls" | xargs)"
urls_space_delimited="$(xargs <<< "$urls")"
read -a url_array <<< "$urls_space_delimited"

clear
echo "$titles" | awk '{print NR-1 " " $0}'
awk '{print NR-1 " " $0}' <<< "$titles"

read -p "Select an article: " article