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%
:
- Create new public telegram channel
@r_%subreddit%
. - Add
@reddit2telegram_bot
as administrator to this channel. - Make a pull request to this repo with new script to make posts (use
/channels/r_funnny/app.py
as draft). - Then I will make it alive :)
- For any questions do not hesitate to contact me in this group or on reddit.
Easiest way is to do it with docker. It will set up the mongo database dependency.
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 inprod.yml
.
docker-compose up -d
-d
is detach. Leave out to see output.
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 databasemongo
)--build
if you changed code and need a new build version
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!)