Hey everyone.

Recently I found the “red2lem” bot here.

I forked it and made some changes to the code.

I’ve only tested it using Docker, but I think (?) it also should work independently of it.

Purpose of the Bot

The bot monitors a subreddit of your choosing, and it’ll crosspost all posts to a lemmy community of your choosing. I guess it could be nice, if somebody wanted to create a mirror’ed community or something.

What does a mirrored post look like?

You can see an example here and here.

This is with the ENV title_template set to "[♻️ /u/{author_name}] - {submission_title}"

I want to try it out!

If you want to try it out, you can check the PR I made to the original repository.

Quick Docker Compose example

If you’re too lazy, and don’t want to go the PR, you can also just use this docker compose example:

version: "3.9"
services:
  red2lem:
    build: https://github.com/vp-en/red2lem.git#feat-revampProject
    container_name: red2lem
    environment:
      reddit_client_id: YOUR_REDDIT_CLIENT_ID
      reddit_client_secret: YOUR_REDDIT_CLIENT_SECRET
      lemmy_url: YOUR_LEMMY_URL
      lemmy_username: YOUR_LEMMY_USERNAME
      lemmy_password: YOUR_LEMMY_PASSWORD
      subreddit_name: YOUR_SUBREDDIT_NAME # e.g. NoStupidQuestions
      community_name: YOUR_COMMUNITY_NAME # e.g. bot_testing@lemm.ee
      imgur_client_id: YOUR_IMGUR_CLIENT_ID # Optional
      imgur_client_secret: YOUR_IMGUR_CLIENT_SECRET # Optional
      copy_automoderator_posts: false # Optional, default is False
      post_check_interval: 60 # Optional, default is 60
      title_template: "[X-Posted from Reddit - /u/{author_name}] - {submission_title}" # Optional
    restart: unless-stopped