Run the command below where makefile is located to build the project.
makeIf you run
makesucessfully, then no need to do the other steps.
Run the command below where makefile is located to build the venv and install required dependencies.
make venv
Run the command below where makefile is located to build the praw.ini.
make praw.iniYou wil be asked to enter credentials for praw.ini.
Run the command below where makefile is located to delete the venv and praw.ini.
make clean
If make is succesfully completed:
- Make sure playwright browsers are installed.
- Install ImageMagick. Required for watermark.
- Edit the watermark text.
- Add background videos.
- Edit the configuration for subreddits.
Run from the project's root folder.
python reddit_to_video/main.pypraw.ini is required at the root directory of the project.
Can be built with 'make praw.ini'.
Example:
[bot1]
client_id=yourClientId
client_secret=yourSecretId
user_agent=userAgentNameTo install browsers run in the terminal.
playwright installOr run 'make venv' in the terminal.
ImageMagick is required to be able to add watermark to videos.
If you are getting security policy error, go to /etc/ImageMagick-6/policy.xml and comment out the following line:
<policy domain="path" rights="none" pattern="@*"/>
You can install it from the offical website. You may also need to set the path.
You can install it with your package manager.
You can add, remove or change the configuration for subreddits from subreddits.json
You can find and download the background videos from the releases or you can use your own custom videos.
After downloading background videos, place them inside background_videos folder which is located at the root of the project.
Videos should be 60 seconds long as the script will collect texts up to 60 seconds. Or maximum video duration should also be changed from the script.