-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from v411e/develop
Fixes and features from tante - Fix Dockerfile not creating all necessary directories - Split up config into `config.yaml` and `auth.yaml` - Add feature to filter instances
- Loading branch information
Showing
6 changed files
with
115 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
![](./res/hype_header.png) | ||
|
||
# hype | ||
|
||
This Mastodon bot transfers the trends from other instances directly to your personal timeline. You decide which instances it fetches and how much you want to see per instance. | ||
|
||
## Why | ||
I am hosting my own mastodon instance and my server is very small (~2 active users). This is why trends simply do not work on my instance. There is just not enough activity. I used to open up the explore-pages of other interesting mastodon instances once per day to discover interesting topics and posts beyond my subscriptions. But that is a bit tedious in the long run. One afternoon I decided to write a bot for this issue and here we are :tada: | ||
|
||
For smaller instances the local timeline is rather empty. This is why trends simply do not work on those instances: There is just not enough activity. Instead of manually checking out other instances this bot allows to subscribe to a multitude of different mastodon compatible servers to fetch trending posts and repost them to your current server helping discoverability of accounts, people and topics within the federated social web. | ||
|
||
## Installation | ||
|
||
Deploy with docker-compose | ||
|
||
```yaml | ||
|
@@ -17,23 +21,35 @@ services: | |
- ./config:/app/config | ||
``` | ||
## Configuration | ||
Create a `config.yaml` file in `./config/` and enter the credentials of your bot-account. Also define how often the bot should run. See the example below: | ||
Create a `config.yaml` and a `auth.yaml` file in `./config/`. Enter the credentials of your bot-account into `auth.yaml`. You can define which servers to follow and how often to fetch new posts as well as how to automatically change your profile in config.yaml. See the examples below: | ||
|
||
`auth.yaml`: | ||
|
||
```yaml | ||
# Credentials for your bot account | ||
bot_account: | ||
server: "mastodon.example.com" | ||
email: "[email protected]" | ||
password: "averylongandsecurepassword" | ||
``` | ||
|
||
`config.yaml` | ||
|
||
```yaml | ||
# Refresh interval in minutes | ||
interval: 60 | ||
# Define subscribed instances and | ||
# Text to add to the bot profile befor the list of subscribed servers | ||
profile_prefix: "I am boosting trending posts from:" | ||
# profile fields to fill in | ||
fields: | ||
code: https://github.com/tante/hype | ||
operator: "YOUR HANDLE HERE" | ||
# Define subscribed instances and | ||
# their individual limit (top n trending posts) | ||
# which is again limited by the API to max 20 | ||
subscribed_instances: | ||
|
@@ -49,5 +65,3 @@ subscribed_instances: | |
- Update bot profile with list of subscribed instances | ||
|
||
--- | ||
|
||
<a rel="me" href="https://mastodon.keks.club/@hype">Hype on Mastodon</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Credentials for your bot account | ||
bot_account: | ||
server: "" | ||
email: "" | ||
password: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
# Credentials for your bot account | ||
bot_account: | ||
server: "" | ||
email: "" | ||
password: "" | ||
|
||
# Refresh interval in minutes | ||
interval: 60 | ||
|
||
# Define subscribed instances and | ||
# Text to add to the bot profile befor the list of subscribed servers | ||
profile_prefix: "I am boosting trending posts from:" | ||
|
||
# profile fields to fill in | ||
fields: | ||
code: https://github.com/v411e/hype | ||
operator: "YOUR HANDLE HERE" | ||
|
||
# Define subscribed instances and | ||
# their individual limit (top n trending posts) | ||
# which is again limited by the API to max 20 | ||
subscribed_instances: | ||
chaos.social: | ||
limit: 20 | ||
limit: 5 | ||
mastodon.social: | ||
limit: 5 | ||
limit: 5 | ||
|
||
# Posts originating from filtered instances will never be reposted. | ||
# The filter checks for the instance of the original posting account, not the | ||
# server that marked it as a popular post. | ||
# This can be used to filter out abusive instances as well as protect small | ||
# instances who could be overwhelmed with a repost to a significant amount of | ||
# other instances | ||
filtered_instances: | ||
- example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters