Skip to content

yyakko/reddit2telegram

 
 

Repository files navigation

reddit2telegram

Hi there!

These bots just send latest hot submissions from subreddit /r/%subreddit% to telegram channel @r_%subreddit% hourly. For example /r/gifs@r_gifs.

If you want to obtain your own channel for /r/%subreddit%:

  1. Create new public telegram channel @r_%subreddit%.
  2. Add @reddit2telegram_bot as administrator to this channel.
  3. Make a pull request to this repo with new script to make posts (use /channels/r_funnny/app.py as draft).
  4. Then I will make it alive :)
  5. For any questions do not hesitate to contact me in this group or on reddit.

Currently alive channels

Subreddit Telegram Channel Periodicity
/r/gifs @r_gifs 1 hour
/r/jokes @r_jokes 2 hours
/r/funny @r_funny 1 hour
Some data related subreddits. Full list. @DataScientology 1 hour
/r/asiangirlsbeingcute @asiangirlsbeingcute 1 hour
/r/behindthegifs @r_behindthegifs 1 day
Some python related subreddits. Full list. @pythondaily 1 hour
/r/unexpected @r_unexpected 30 mins
Some subreddits about history. List. @RedditHistory 4 hours
/r/bitcoin @r_bitcoin 1 hour
/r/pics @r_pics_redux 1 hour
/r/politics and /r/news @news756 1 hour
Cat related. List. @RedditCats ~1 hour
/r/TIL @r_TIL 8 hours
/r/awwnime @r_awwnime 1 hour
/r/mylittlepony @r_mlp 1 hour
/r/Showerthoughts/ @r_Showerthoughts 1 hour
/r/HighQualityGifs/ @r_HighQualityGifs 1 hour
/r/dankmemes/ @r_dankmemes 1 hour
/r/me_irl/ @r_me_irl 1 hour
/r/PoliticalHumor/ @PoliticalHumor 1 hour
/r/OldSchoolCool/ @OldSchoolCool 3 hours
/r/food/ @reddit_food 3 hours
Some gifs. @rddit 3 hours
/r/denpasong/ and /r/denpa/ @denpasong 1 hour
/r/movies/, /r/CineShots/, and /r/MoviePosterPorn/ @r_movies 1 hour
BeautifulFemales from list. @r_gentlemanboners 2 hours
Best from /r/all. @reddit_all 3 hours
/r/AskReddit @r_AskReddit 1 hour
/r/changemyview @r_changemyview 1 hour
/r/explainlikeimfive @r_explainmelikeimfive 1 hour
/r/hmmmgifs and /r/hmmm/ @just_hmmm ½ hour
/r/ProgrammerHumor @programmer_humor 1 hour
/r/cryptocurrency @r_cryptocurrency 2 hours
/r/foodporn @dailyfoodporn 1 hour
/r/overwatch @r_overwatch 1 hour
/r/cryptocurrency @r_cryptocurrency 2 hours
/r/pantsu @r_pantsu 1 hours
/r/listentothis @r_listentothis 1 hours
/r/ramen @r_ramen 1 hours
... be the next one ...

If you appreciate it




Running it

Easiest way is to do it with docker. It will set up the mongo database dependency.

Config

Make your copy of prod.yml and imgur.yml.

cp prod.yml.example prod.yml
cp imgur.yml.example imgur.yml

Now edit the files, replacing the values with real ones.

Note: When using docker, db_host: "mongo" must be set in prod.yml.

Launching

docker-compose up -d
  • -d is detach. Leave out to see output.

Changing code

docker-compose up reddit2tg --build

Assuming you already started mongo in detached mode (above). This rebuilds the reddit2tg image and launches it.

  • reddit2tg: the service name of the bot part (as opposed to the database mongo)
  • --build if you changed code and need a new build version

Note

The reddit2tg docker image is terminating pretty quickly as the python script was made for a cron script. Currently you have to either start the container over and over again (docker-compose up -d reddit2tg) or finally write a cron like script in the docker container. (Send a PR please!)

About

Bot to supply telegram channel with hot reddit submissions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Shell 0.3%