Let me ask you:
If you replied ⭐ yes ⭐ to any of the question above, this is the right place for you! Why this project stands out?
👉 shorts
reddit-hole/
├── assets/
│ ├── background/
│ ├── fonts/
│ ├── temp/
│ ├── config.toml
│ ├── cookie-dark-mode.json
│ ├── cookie-light-mode.json
│ ├── database.json
│ └── my_title_template.png
├── docs/
├── env/
├── results/
│ ├── long/
│ ├── short/
├── utils/
│ ├── captions.py
│ ├── helpers.py
│ ├── reddit.py
│ ├── tts.py
│ └── videomaker.py
├── .env
├── .gitignore
├── LICENSE
├── main.py
├── README.md
└── requirements.txt
Clone this repository
Create virtual environment and install all dependencies
python -m venv env
source env/bin/activate
pip install -r requirements.txt
python -m playwright install and python -m playwright install-deps
Create .env
file to store environment variables
Setup AWS (Free Tier)
Sing in to the console
Create access key and save it along with the secret access key
Save it in the .env
file
# .env
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION_NAME=
Go to Reddit App Preferences and click on create another app at the bottom.
Fill out the required details, make sure to select script and click on create app.
Make a note of the personal use script and secret token and update the the following credentials in the config.toml
file.
Save it in the .env
file along with your credentials:
# .env
REDDIT_CLIENT_ID=
REDDIT_CLIENT_SECRET=
REDDIT_USERNAME=
REDDIT_PASSKEY=
Download any YouTube video as a background
Here are a few options:
Save the path in the .env
file:
# .env
BACKGROUND="/reddit-hole/assets/background/minecraft.mp4"
Setup configuration in config:
[Reddit]
subreddit='AskReddit'
[settings]
storymode=false
opacity = 0.75
resolution_w = 1920
resolution_h = 1080
pause=0.6
multiple_voices=false
voice_id='Matthew'
Specifically for comments mode (storymode=false
):
[Reddit]
topn_comments=10
max_comment_length=300
min_comment_length=10
[settings]
total_video_duration=59
theme="dark"
zoom = 1.25
All we are left do is run:
python main.py