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