Skip to content
richarveyPublic
forked from v411e/hype

About

Mastodon bot that boosts trending posts from other instances into your timeline

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

50 Commits

Folders and files

Repository files navigation

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

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

Clone this repository and deploy with docker-compose. The image is built from source:

services:
  hype:
    build:
      context: .
    restart: unless-stopped
    volumes:
      - ./config:/app/config:ro
      - hype-secrets:/app/secrets
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL

volumes:
  hype-secrets:

The hype-secrets volume keeps the bot's state between restarts: its app registrations on the subscribed instances and the record of which profile images it uploaded.

The container runs as an unprivileged user (uid 1000), so the files in ./config must be readable by that user.

Configuration

Copy config/auth.example.yaml to config/auth.yaml and enter the credentials of your bot-account. auth.yaml is ignored by git and is never copied into the Docker image, so your access token stays on your machine. 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/config.yaml. See the examples below:

auth.yaml:

# Credentials for your bot account
bot_account:
  server: "mastodon.example.com"
  access_token: "Create a new application in your bot account at Preferences -> Development"

config.yaml

# Refresh interval in minutes
interval: 60

# Text to add to the bot profile befor the list of subscribed servers
profile_prefix: "I am boosting trending posts from:"

# Profile images of the bot, relative to the config directory. They are
# uploaded when the profile does not show them yet. Remove or comment out
# a line to leave that image alone.
avatar: avatar.png
header: header.png

# profile fields to fill in
fields:
  code: https://github.com/v411e/hype
  operator: "YOUR HANDLE HERE"

# Do not boost posts that contain media (images, GIFs, video, audio)
# without alt text (default: true)
ignore_no_alt_txt: true

# 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
  mastodon.social:
    limit: 5

# Boost the latest public posts of specific accounts. Replies and the
# account's own boosts are skipped. limit is the number of most recent
# posts to look at on every run (default 5, max 20)
subscribed_accounts:
  "user@example.social":
    limit: 5

# Post the top ten trending tags once a day, top tag first.
# time is in 24h format, timezone defaults to UTC. The tags come from the
# subscribed instances unless you list instances here. exclude removes tags
# you do not want to see in the post.
trending_tags:
  time: "23:55"
  timezone: "Europe/London"
  # instances:
  #   - mastodon.social
  # exclude:
  #   - sometag
  # title: "Today's top ten tag trends:"
  # footer: "#TrendingTags 📈"

# Filter posts from specific instances
filtered_instances:
  - example.com

Features

  • Boost trending posts from other Mastodon instances
  • Boost the latest posts of specific accounts (subscribed_accounts)
  • Post the top ten trending tags once a day (trending_tags)
  • Skip posts with media (images, GIFs, video, audio) that have no alt text (ignore_no_alt_txt, on by default)
  • Update bot profile with list of subscribed instances
  • Set the bot's avatar and header image from files in the config directory (avatar, header)

About

Mastodon bot that boosts trending posts from other instances into your timeline

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages