Quote-post all posts from a given hashtag.
Iri al dosiero
Jaidyn Ann 99c8cb38d9 Add COPYING 2024-04-11 00:11:47 -05:00
res Add screenshot to README 2024-04-11 00:09:58 -05:00
COPYING Add COPYING 2024-04-11 00:11:47 -05:00
README.md Add COPYING 2024-04-11 00:11:47 -05:00
manicito Add option for disabling quote-posts 2024-04-10 22:10:48 -05:00

Manicito

Quote-post an entire hashtag on the fediverse!

A screenshot of a post to a Pleroma server. It is a quote-post made by a a bot-account called “esperanto_fluo” (English: “Esperanto-feed”), quoting a post by a user called Garfildo. The quoted post contains two images and its own text-body; the quoting post contains simply the text, “Garfildo afiŝis:” (English: “Garfildo posted:”) followed by a URL

On Mastodon, one can “follow” a hashtag, seeing all public posts of a hashtag in their home feed. On Pleroma (and some other fedi servers), however, this isnt possible.

The maniacal quote-poster Manicito is a script that can help you mimic this feature — it quote-posts all posts of a given hashtag. Following a bot-account backed by Manicito is (to some degree) just like “following” a hashtag.

Usage

To quote-post everything from the hashtag #esperanto, you could run Manicito like so:

$ FEDI_AUTH="yourAuthTokenHere"
$ manicito -H esperanto.history esperanto https://yourServer.here

Auth-key

In order to actually use Manicito, we need to find the authorization token for our fedi account.

To find your authorization token, you can snoop through request headers in Firefox or Chromium by navigating to Developer Tools (F12) → Network → Headers. Refresh your Mastodon/Pleroma page and examine a request, looking for a header like so:

Authorization: Bearer $FEDI_AUTH

… where $FEDI_AUTH is your token. Copy it!

Whenever you use Manicito, make sure that this token is stored in the environment variable $FEDI_AUTH.

History-file

However note up there the use of the -H parameter with esperanto.history. The file you pass to the -H parameter will be used to log all posts that have been quote-posted up until now; this helps us make sure that we dont accidentally repost things.

If you want to use Manicito as the basis of a hashtag-bot (regularly updating and posting), you can add it to your crontab or write a systemd service + timer. Though note that in this case you will need to make sure -H is set to a reliable and unchanging path. Otherwise, it might go haywire.

Formatting

Manicitos post template is stored in the environment variable $MANICITO_TEMPLATE. By default, it is something along these lines:

$USER (<a href="$USER_URL">$USERHOST</a>) <a href="$POST_URL">posted</a> about $HASHTAG:
<blockquote>$(echo "$POST" | head -c 200)</blockquote>

You can go ahead and set the environment variable $MANICITO_TEMPLATE to any string you want. As you can see above, it has some shell-style variables that get substituted. They are:

  • USER_URL
  • USERHOST
  • POST
  • POST_URL
  • HASHTAG

Compatibility

By default, Manicito attemps quote-posting, which is a feature that allows posts to be indirectly cited (and often prettily displayed) within other posts. This is supported by Pleroma and Misskey, but not by Mastodon. If you are using Mastodon, you might want to use the -Q flag, which disables this feature.

Installation

Installing Manicitos quite easy — just copy it into your $PATH!

$ cp manicito ~/.local/bin/

There, youve done it!

Misc.

Author: @jadedctrl:jam.xwx.moe
Source: https://hak.xwx.moe/jadedctrl/manicito
License: GPLv3