79 lines
3.5 KiB
Markdown
79 lines
3.5 KiB
Markdown
# 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](res/screenshot.png)
|
||
|
||
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](https://hak.xwx.moe/jadedctrl/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 (<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 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](COPYING)
|