this post was submitted on 13 Aug 2023
2 points (100.0% liked)

Programming

17443 readers
153 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

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
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here