From ee5e64e5d120f8e9b03f652f5f83bbfe28bda479 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:10:48 -0500 Subject: [PATCH] Add option for disabling quote-posts --- manicito | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manicito b/manicito index 526498b..884a3ff 100755 --- a/manicito +++ b/manicito @@ -17,6 +17,7 @@ usage() { echo echo ' -h print this message and exit' echo ' -H file used to store/check quoted posts; to avoid duplicates' + echo ' -Q disable actual quote-posting (which Mastodon doesn’t support)' echo ' -s scope for posts, one of: public/[unlisted]/private/direct' echo echo 'Posts tagged under HASHTAG will all be quote-posted to the' @@ -94,7 +95,9 @@ quote_posts() { post_json() { local tagged_post_json="$1" printf '{ "content_type": "text/html", "visibility": "%s",' "$FEDI_SCOPE" - printf '"quote_id": "%s",' "$(echo "$tagged_post_json" | jq -r .id)" + if test -z "$NO_QUOTE_POSTS"; then + printf '"quote_id": "%s",' "$(echo "$tagged_post_json" | jq -r .id)" + fi printf '"expires_in": %s,' 864000 printf '"status": "%s" }\n' "$(post_body "$tagged_post_json")" } @@ -180,7 +183,7 @@ env_subst() { FEDI_SCOPE="unlisted" # Default value. -while getopts 'hH:s:' arg; do +while getopts 'hH:s:Q' arg; do case $arg in h) usage @@ -205,6 +208,9 @@ while getopts 'hH:s:' arg; do exit 6 fi ;; + Q) + NO_QUOTE_POSTS="1" + ;; esac done