An application that index content with #hashtags on Mastodon using FakeRelay
Go to file
2022-12-22 12:44:34 +00:00
.github/workflows Also build the trimmed artifacts on the required check (#18) 2022-12-21 00:12:19 -03:00
docs Update README (#5) 2022-12-16 11:57:30 -03:00
src Moar logging (#21) 2022-12-22 12:44:34 +00:00
.gitignore Mastodon connection helper tweaks (#13) 2022-12-21 02:26:06 +00:00
Dockerfile Rename! 2022-12-05 08:38:07 -03:00
LICENSE.md Update README and add LICENSE (#8) 2022-12-20 18:06:23 -03:00
README.md Update README and add LICENSE (#8) 2022-12-20 18:06:23 -03:00

GetMoarFediverse

This is a small app that shows how you could use FakeRelay to import content into your instance that's tagged with hashtags you're interested in.

This doesn't paginate over the tags, that means it will import up to 20 statuses per instance. This also keeps a txt file with all the statuses it has imported.

How can I run it?

Download a prebuilt executable

You can download an executable for your environment on the releases page. In addition to that, you will need to set up a config.json file with your desired logic. It could be something like this:

{
    "FakeRelayUrl": "https://fakerelay.gervas.io",
    "FakeRelayApiKey": "1TxL6m1Esx6tnv4EPxscvAmdQN7qSn0nKeyoM7LD8b9mz+GNfrKaHiWgiT3QcNMUA+dWLyWD8qyl1MuKJ+4uHA==",
    "Tags": [ "dotnet", "csharp" ],
    "Instances": [ "hachyderm.io", "mastodon.social" ]
}

Once you have that file, all you need to run is ./GetMoarFediverse /path/to/config.json. You can put it on a cron like this :)

1,16,31,46 * * * * /path/to/GetMoarFediverse /path/to/config.json > /path/to/GetMoarFediverse/cron.log 2>&1

You will find an executable for Windows as well, which you can use on a scheduled task.

Have it download all the followed hashtags of your instance

The previous approach works, but you need to hardcode the list of tags. That's not awesome, as you need to keep track of the hashtags you (and your other users follow).

You can pass MastodonPostgresConnectionString with a connection string to your postgres database and GetMoarFediverse will download content for all the hashtags the users on your server follow. Here's an example:

{
    "FakeRelayUrl": "https://fakerelay.gervas.io",
    "FakeRelayApiKey": "1TxL6m1Esx6tnv4EPxscvAmdQN7qSn0nKeyoM7LD8b9m+GNfrKaHiWgiT3QcNMUA+dWLyWD8qyl1MuKJ+4uHA==",
    "MastodonPostgresConnectionString": "Host=myserver;Username=mastodon_read;Password=password;Database=mastodon_production",
    "Instances": [ "hachyderm.io", "mastodon.social" ]
}

I wrote a quick article here about it, with instructions to create a read only user.

You can run it on docker

If that's what you like, you can check out this document with instructions.