commit: 694c1ed043ea1920a2b39645e6fa68c64d40c845
parent 146d81e44d12bac4532f8926063094b550839ea6
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 21 Aug 2021 00:27:41 +0200
bin/{nodeinfo-fetch,webfinger}.sh: Move to ap-client
See https://hacktivis.me/git/ap-client/
Diffstat:
2 files changed, 0 insertions(+), 40 deletions(-)
diff --git a/bin/nodeinfo-fetch.sh b/bin/nodeinfo-fetch.sh
@@ -1,23 +0,0 @@
-#!/bin/sh
-url="$1"
-accept_header='Accept: application/json'
-nodeinfo_url=''
-
-die() {
- echo $@
- exit 1
-}
-
-if [[ -z "${url}" ]]
-then
- die "Usage: ${0} [instance_url]"
-fi
-
-nodeinfo_url=$(curl -sSL -H "${accept_header}" "${url}/.well-known/nodeinfo" | jq '.links[].href' -r | sort | tail -1)
-
-if [[ -z "${nodeinfo_url}" ]]
-then
- die "Failed getting Nodeinfo endpoint"
-fi
-
-curl -sSL -H "${accept_header}" ${nodeinfo_url} | jq .
diff --git a/bin/webfinger.sh b/bin/webfinger.sh
@@ -1,17 +0,0 @@
-#!/bin/sh
-acct="$1"
-accept_header='Accept: application/json,application/xml'
-
-die() {
- echo $@
- exit 1
-}
-
-if [[ -z "${acct}" ]]
-then
- die "Usage: ${0} [webfinger acct]"
-fi
-
-host=$(cut -f2 -d'@' <<<"${acct}")
-
-curl -sSL -H "${accept_header}" "http://${host}/.well-known/webfinger?resource=acct:${acct}"