The little things give you away... A collection of various small helper stuff
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

4 righe
806 B

  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