# Manicito On [Mastodon](https://joinmastodon.org/), one can [“follow” a hashtag](https://fedi.tips/how-do-i-follow-hashtags-on-mastodon-and-the-fediverse/), seeing all public posts of a hashtag in their home feed. On [Pleroma](https://pleroma.social) (and some other fedi servers), however, this isn’t 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 don’t 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 Manicito’s post template is stored in the environment variable `$MANICITO_TEMPLATE`. By default, it is something along these lines: ``` $USER ($USERHOST) posted about $HASHTAG:
$(echo "$POST" | head -c 200)
``` 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 Manicito’s quite easy — just copy it into your `$PATH`! ``` $ cp manicito ~/.local/bin/ ``` There, you’ve done it! ## Misc. Author: [@jadedctrl:jam.xwx.moe](https://jam.xwx.moe/users/jadedctrl) Source: https://hak.xwx.moe/jadedctrl/manicito License: GPLv3