From 06dbd52a54fc0bc74b433a831b75423a4b9127e8 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 27 Feb 2024 03:29:54 -0500 Subject: [PATCH] Generate focus-first sites properly --- csv/webrings.base.csv | 1 - scripts/populate-webrings.sh | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/csv/webrings.base.csv b/csv/webrings.base.csv index c2f7177..ee2d265 100644 --- a/csv/webrings.base.csv +++ b/csv/webrings.base.csv @@ -2,7 +2,6 @@ name,prev,home,next,random Indieweb,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous,https://xn--sr8hvo.ws/,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next,null a11y-webring,https://a11y-webring.club/prev,https://a11y-webring.club/,https://a11y-webring.club/next,https://a11y-webring.club/random Retroweb,https://webri.ng/webring/retroweb/previous?index=3,https://indieseek.xyz/webring/,https://webri.ng/webring/retroweb/next?index=3,https://webri.ng/webring/retroweb/random -Focus First,https://dj-chase.com/,https://owlsroost.xyz/webring/,https://owlsroost.xyz/,null CSS,https://webri.ng/webring/cssjoy/previous?via=https://seirdy.one/,https://cs.sjoy.lol/,https://webri.ng/webring/cssjoy/next?via=https://seirdy.one/,https://webri.ng/webring/cssjoy/random/ TheOldNet,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/previous/navigate,https://webring.theoldnet.com/,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/next/navigate,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/random/navigate geekring,https://geekring.net/site/167/previous,https://geekring.net/,https://geekring.net/site/167/next,https://geekring.net/site/167/random diff --git a/scripts/populate-webrings.sh b/scripts/populate-webrings.sh index f60865f..abf1e9d 100755 --- a/scripts/populate-webrings.sh +++ b/scripts/populate-webrings.sh @@ -65,12 +65,25 @@ endless_orbit() { echo 'null' } +focus_first() { + printf 'Focus First,' + curl -sSL --compressed https://owlsroost.xyz/webring/onionring-variables.js \ + | grep -C 1 https://seirdy.one/ \ + | tr -d "'\r\n\t" | sed 's|https://seirdy.one/|https://owlsroost.xyz/webring/index.html|' + echo 'null' +} + +all_lines() { + endless_orbit + focus_first +} + if [ "$dry_run" = '1' ]; then endless_orbit elif [ -f "$webrings_dest" ]; then echo "webrings file already generated" else - endless_orbit | cat "$webrings_src" - >"$webrings_dest" + all_lines | cat "$webrings_src" - >"$webrings_dest" fi # vi:ft=sh