From 8749935f4be2d685b6a77d8e31d4ce91726c12a3 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 15 Dec 2021 13:08:10 -0500 Subject: simple fedi script --- fedi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 fedi (limited to 'fedi') diff --git a/fedi b/fedi new file mode 100755 index 0000000..96e7755 --- /dev/null +++ b/fedi @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# + set -eou pipefail + timeline=${1:-home} + endpoint="https://bitcoinhackers.org" +# + curl -sL \ + -H "Authorization: Bearer i-baQt_tYmJ_NA8F4VcXBe2x1ZLaOBvRayHhzYzEP3Y" \ + "$endpoint/api/v1//timelines/$timeline" \ + | jq -r '.[] | [.account.username, .content] | @tsv' \ + | sed 's,<[^>]*>,,g' \ + | column --table --separator $'\t' --table-wrap 2 --output-width 80 \ + | sed 's,$,\n,g' +# -- cgit v1.2.3