instanceinfo.sh: Improved pixelfed support.
This commit is contained in:
parent
a3051b1c19
commit
29f9af8e66
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Print some basic info about fediverse instances.
|
||||
|
||||
# Version: 2019-07-15_2
|
||||
# Version: 2019-07-16_1
|
||||
|
||||
if [[ -z "${1}" ]]; then
|
||||
echo "usage: ${0} DOMAIN" >&2
|
||||
|
@ -79,6 +79,10 @@ function main()
|
|||
echo -n "Number of users: "
|
||||
jq -r ".usage.users.total" <<<"${json}"
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
local active=$(jq -r ".usage.users.activeMonth" <<<"${json}")
|
||||
[[ "${active}" != "null" ]] && echo "Active user (month): ${active}"
|
||||
|
||||
echo -n "Open registrations: "
|
||||
jq -r ".openRegistrations" <<<"${json}"
|
||||
|
||||
|
@ -95,6 +99,8 @@ function main()
|
|||
jq -r ".metadata.library.tracks.total" <<<"${json}"
|
||||
elif [[ "${implementation}" == "mastodon" ]]; then
|
||||
echo "Further info, maybe: https://${instance}/about/more"
|
||||
elif [[ "${implementation}" == "pixelfed" ]]; then
|
||||
echo "Further info, maybe: https://${instance}/site/terms"
|
||||
fi
|
||||
elif curl -sILf "${mastoinfo}" | grep -iq 'Content-Type: application/json'; then
|
||||
echo "Mastodon API found."
|
||||
|
|
Loading…
Reference in New Issue
Block a user