Seppo.Social -> Seppo.mro.name
[Seppo.git] / test / data / ap / pull.sh
blob1e48ce52deb95bf973a9f8b69f369dc05662472b
1 #!/bin/sh
2 cd "$(dirname "$0")" || exit 1
4 while read -r h n pro
5 do
6 echo "$h -> $n -> $pro"
7 lo="$(echo "$h" | cut -d '@' -f2)"
8 ho="$(echo "$h" | cut -d '@' -f3)"
9 curl \
10 --create-dirs \
11 --dump-header "webfinger/$h.head" \
12 --header "Accept: application/jrd+json" \
13 --location \
14 --max-time 5.0 \
15 --output "webfinger/$h.json" \
16 --silent \
17 "$ho/.well-known/webfinger?resource=acct:$lo@$ho" \
18 > /dev/null
19 curl \
20 --create-dirs \
21 --dump-header "profile/$h.head" \
22 --header 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' \
23 --header 'Accept: application/activity+json' \
24 --location \
25 --max-time 5.0 \
26 --output "profile/$h.json" \
27 --silent \
28 "$pro" \
29 > /dev/null
30 done \
31 < accounts.txt