What's next
You're done with this website? Here are some others

Category: people

Category: people art

Category: people

Category: tools cool-internet

Category: info

Category: people

Category: cool-internet

Category: webrings

Category: webrings

Category: webrings

Category: media

Category: media

Category: media

Category: webrings

Category: tools

Category: pubnixes

Category: pubnixes

Category: cool-internet

Category: games

Category: people

Category: cool-internet games

Category: tools

Category: people

Category: people

Category: tools

Category: art

Category: info, games

Category: people

Category: themed-blogs cool-internet

Category: code art

Category: themed-blogs cool-internet

Category: proxy cool-internet

Category: people art

Category: poetry art

Category: conlang tools

Category: people art

Category: tools cool-internet

Category: people

Category: cool-internet info

Category: games

Category: info

Category: people

Category: people

Category: people

Category: people

Category: info people themed-blogs

Category: proxy tools

Category: proxy tools

Category: media archive

Category: themed-blogs people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: media

Category: code

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people

Category: people art

Category: themed-blogs info

Category: people

Category: people

Category: people

Category: people

Category: people

Category: cool-internet

Category: cool-internet

Category: people

Category: art poetry

Category: art poetry

Category: people

Category: people

Category: people

Category: media info archive

Category: people art

Category: code

Category: people

Category: people

Category: people

Category: people

Category: code

Category: proxy tools

Category: conlang

Category: tools accessibility

Category: tools info

Category: tools accessibility

Category: info accessibility

Category: info

Category: info media archive
This grid was generated. Click to view script.
#!/bin/bash
dafile="/var/www/dead.garden/next/index.html"
temp="/tmp/blogroll"
batch="/var/www/dead.garden/next/.links"
# FUNCTIONS
nope(){
echo "$1 is already on there. nothing to do"
}
edit_html() {
if [[ $(cat "$dafile"| grep "$1") != "" ]]; then
nope $1
else
if [[ $2 != "" ]]; then
category="<p>Category: $2<\/p>"
fi
echo "Adding $1"
site="$(echo "$1" | sed 's/\//\\\//g')"
sed -i "s/<\!-- list -->/<\!-- list -->\n<a href=\"https:\/\/$site\"><figure class=\"blogroll $2\"> <img loading=\"lazy\" alt=\"Screenshot preview of $site\" src=\"https:\/\/dead.garden\/img\/links\/$img\"><figcaption><strong>$site<\/strong>$category<\/figcaption><\/figure><\/a>/" $dafile
echo "Done"
fi
}
download_img() {
fimg="/var/www/dead.garden/img/links/$img"
if [[ $(ls "$fimg") != "$fimg" ]]; then
shot-scraper https://"$1" -h 630 -w 1080 --wait 2000 -o $fimg
ls $fimg
convert $fimg -blur 0x3 -resize 250 -dither FloydSteinberg $fimg
fi
}
add_tags() {
echo "$2" | sed "s/ /\n/g" > $temp
i=$(cat "$temp" | wc -l)
while [[ $i -gt 0 ]]
do
tag=$(head -n $i $temp | tail -n +$i)
echo "Going to add $tag ...."
if [[ $(cat $dafile | grep "id=\"$tag\"") = "" ]]; then
sed -i "s/<!-- here -->/<!-- here -->\n<label><input class=\"brfilter\" type=\"radio\" id=\"$tag\" name=\"choose\" value=\"$tag\">$tag<\/label>/" $dafile
if [[ $(cat $dafile | grep "#$tag") = "" ]]; then
sed -i "s/\/\* start of list \*\//\/\* start of list \*\/ \n body:has(#$tag:checked) .blogroll:not(.$tag),/" $dafile
fi
echo "done!"
else
nope $tag
fi
((i--))
done
rm $temp
}
# =============================== START =====================================
if [[ $1 = "batch" ]]; then
if [[ $(ls $2) = $2 ]]; then
k=$(cat "$2" | wc -l)
echo "$k sites to do! on it boss"
while [[ $k -gt 0 ]]
do
site=$(head -n $k $2 | tail -n +$k | grep -o '^[^ ]*' | sed "s|/|\/|g")
tag=$(cat "$2" | head -n $k $2 | tail -n +$k | sed -e 's/.*?\(.*\)?.*/\1/')
img="$(echo "$site" | sed -e "s|\.|-|g" -e "s|/|-|g").png"
edit_html "$site" "$tag"
download_img "$site" "$tag"
add_tags "$site" "$tag"
echo "$site added!"
((k--))
done
else
echo "no such file"
fi
elif [[ $1 != "" ]]; then
if [[ $(cat "$dafile" | grep "$1") != "" ]]; then
nope $1
elif [[ $1 != "batch" ]]; then
img="$(echo "$1" | sed -e "s/\./-/g" -e "s/\//-/g").png"
echo "$1 ?$2?" >> $batch
download_img "$1" "$2"
edit_html "$1" "$2"
add_tags "$1" "$2"
fi
fi