Add configuration schema and YAML loader

This commit is contained in:
authentik Default Admin 2025-08-28 14:15:00 -03:00
parent 2cc5f01c52
commit d8c4f91d68
2 changed files with 202 additions and 0 deletions

39
config.yaml.example Normal file
View file

@ -0,0 +1,39 @@
# Reddit Media Collector - Configuration
# Copy this file to config.yaml and customize as needed
# No Reddit API credentials required - uses public JSON endpoints
targets:
# Subreddits to collect from
subreddits:
- name: "pics"
limit: 25
sort: "hot" # hot, new, top, rising
- name: "earthporn"
limit: 50
sort: "top"
time_filter: "week" # hour, day, week, month, year, all (only for "top" sort)
# Users to collect from (their submitted posts)
users: []
# - name: "example_user"
# limit: 30
download:
output_dir: "./downloads"
media_types:
- "image"
- "video"
- "gif"
min_score: 10 # Minimum upvotes to download
skip_nsfw: true # Skip NSFW posts
max_file_size_mb: 100 # Skip files larger than this
rate_limit:
# Be gentle! Public API has stricter limits than authenticated
requests_per_minute: 10 # Keep low to avoid 429 errors
download_delay_seconds: 2 # Delay between file downloads
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR
file: "collector.log"