diff --git a/fedi2html.sh b/fedi2html.sh
index 42d3255..d2ac55b 100755
--- a/fedi2html.sh
+++ b/fedi2html.sh
@@ -6,66 +6,6 @@
# Date:
#―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
-# Return the ID of a post, based on its URL.
-# url_id $url
-url_id() {
- local url="$1"
- # Pleroma-style URLs: https://jam.xwx.moe/notice/Ac6PIZAP0ZzkMTYBBg
- # Mastodon-style URLs: https://esperanto.masto.host/@minjo/111461250815264185
- if echo "$url" | grep "/notice/" > /dev/null; then
- echo "$url" \
- | sed 's%.*/notice/%%'
- else
- echo "$url" \
- | sed 's%.*/@[[:alnum:]]*/%%'
- fi
-}
-
-
-# Return the server (including protocol) of a post, based on its URL.
-# url_server $url
-url_server() {
- local url="$1"
- local protocol="$(echo "$url" | grep --only-matching '[[:alnum:]]*://')"
- printf "$protocol"
- echo "$url" \
- | sed 's%^'"$protocol"'%%' \
- | sed 's%/.*%%'
-}
-
-
-# Make a request to the /api/v1/statuses/:id/$request API endpoint.
-# statuses_api_request $post_url $request
-statuses_api_request() {
- local post_url="$1"
- local api_request="$2"
- if test -n "$api_request"; then
- api_request="/$api_request"
- fi
-
- local id="$(url_id "$url")"
- local server="$(url_server "$url")"
- curl --location --header 'Accept: application/json,application/activity+json' \
- "$server/api/v1/statuses/${id}${api_request}"
-}
-
-
-# Require the context-JSON of a post, by URL.
-# fetch_post_context $url
-fetch_post_context() {
- local url="$1"
- statuses_api_request "$url" "context"
-}
-
-
-# Given a post URL, request its JSON.
-# fetch_post $url
-fetch_post() {
- local url="$1"
- statuses_api_request "$url"
-}
-
-
POST_TEMPLATE='