Skip to content

Instantly share code, notes, and snippets.

@antiops
Created March 11, 2023 03:49
Show Gist options
  • Save antiops/6b92ba0efeefcc3437a14008519f4aac to your computer and use it in GitHub Desktop.
Save antiops/6b92ba0efeefcc3437a14008519f4aac to your computer and use it in GitHub Desktop.
Mastodon User Posts API values with URLs
jq -r '.[].account.avatar'
jq -r '.[].account.avatar_static'
jq -r '.[].account.header'
jq -r '.[].account.header_static'
jq -r '.[].account.emojis[].url'
jq -r '.[].account.emojis[].static_url'
jq -r '.[].emojis[].url'
jq -r '.[].emojis[].static_url'
jq -r '.[].media_attachments[].url'
jq -r '.[].media_attachments[].preview_url'
jq -r '.[].card.image'
jq -r '.[].account.moved.avatar'
jq -r '.[].account.moved.avatar_static'
jq -r '.[].account.moved.header'
jq -r '.[].account.moved.header_static'
jq -r '.[].account.moved.emojis[].url'
jq -r '.[].account.moved.emojis[].static_url'
#
##
#
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.avatar' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.avatar_static' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.header' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.header_static' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.emojis[].url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].reblog.account.moved.emojis[].static_url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.avatar' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.avatar_static' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.header' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.header_static' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.emojis[].url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].account.emojis[].static_url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].media_attachments[].url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].media_attachments[].preview_url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].card.image' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].emojis[].url' >> /tmp/mastodon-urls.txt; done
for file in *.json; do cat "$file" | jq -r '.[].emojis[].static_url' >> /tmp/mastodon-urls.txt; done
#
##
#
sort -u /tmp/mastodon-urls.txt > /tmp/mastodon-urls.uniq.txt
wget -m /tmp/mastodon-urls.uniq.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment