Added a check for Mastodon in nodeinfo-parser.

This commit is contained in:
tastytea 2019-07-04 21:10:26 +02:00
parent 5bac006152
commit c0a6c1cd7b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Print some basic info about fediverse instances.
# Version: 2019-06-30_2
# Version: 2019-07-04_1
if [[ -z "${1}" ]]; then
echo "usage: ${0} DOMAIN" >&2
@ -93,6 +93,8 @@ function main()
jq -rj ".metadata.library.artists.total" <<<"${json}"
echo -n " / "
jq -r ".metadata.library.tracks.total" <<<"${json}"
elif [[ "${implementation}" == "mastodon" ]]; then
echo "Further info, maybe: https://${instance}/about/more"
fi
elif curl -sIf "${mastoinfo}" | grep -iq 'Content-Type: application/json'; then
echo "Mastodon API found."