fedi-tl 499 B

123456789101112131415161718
  1. #!/bin/bash
  2. #from sev, according to p
  3. h="$1"
  4. l="$2"
  5. if [ -z "$h" ]; then echo "usage: fedi-tl hostname [true|false]" >&2; exit 1; fi
  6. if [ -z "$l" ]; then l=true; fi
  7. # TODO: Use the non pleroma-specific one, pipe through
  8. # htmlfmt or something. Pleroma's "text/plain" screws up
  9. # line breaks.
  10. curl -k -vv -4 https://$h/api/v1/timelines/public?local=$l | \
  11. tee /tmp/fedi-tl-$h | \
  12. jq -r 'map(.account.acct + " [" + .created_at + "]", "\t" + .pleroma.content["text/plain"], "\n")|join("\n")'