The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mastodon-outdated 806 B

123
  1. #!/bin/bash
  2. beforeversion="$1"
  3. curl -s 'https://instances.social/list.json?q%5Busers%5D=&strict=true' | python3 -c 'import json,sys'$'\n''d = json.loads(sys.stdin.read())'$'\n''for i in d["instances"]:'$'\n'' print("{} {} {} {}".format(i["name"], i["version"] or "None", i["users"], i["statuses"]))' | grep -v ' None ' | sort -k2,2 | awk '$2 < "'"${beforeversion}"'"' | awk '{print $1 " | data-sort-value=\"" $1 "\" | [http://" $1 "/ " $1 "] || " $2 " || " $3 " || " $4 }' | while read -r domain line; do content="$(curl -sL "http://${domain}/about")"; if grep -qF '//github.com/tootsuite/mastodon' <<<"${content}"; then mastodon="{{green|Yes}}"; elif grep -qF 'mastodon' <<<"${content}"; then mastodon="{{orange|Possibly}}"; else mastodon="{{red|No?}}"; fi; echo "${line} || ${mastodon}"; echo '|-'; done