Sync reddit stories to a personal sub
- Clone the repo to your computer
- Copy the
.env.example
file to.env
and add your own credentials and secrets - Copy the
config.yaml.example
file toconfig.yaml
and add your own username, subreddits, and such - Create an empty sqlite database with
touch app/db.sqlite
- Start the container whenever you want to sync your stories with
docker-compose up
I use a yaml config file to set up where to pull stories to and from:
GammaGames: # Take stories from /u/GammaGames
count:
posts: 16 # Only pull the latest 16 posts
comments: 64 # Only pull the latest 64 comments
from: # A list of subreddits to allow past the filter
WritingPrompts:
comments: # Sync comment stories
- delay: # Only sync them after a delay. This can be in hours, days, weeks, etc.
days: 2
- require-title # Require a title? I almost always have one
- extract-title # If not extracted, it will use the OP title
shortstories:
posts: # Sync post stories
- delay:
days: 2
comments: # Sync comment stories, similar as above
- delay:
days: 2
- require-title
- extract-title
- extract-subtitle # Useful for serials that have sub-headers
to: # Post the stories to r/GammeWrites
GammaWrites
Additional notes:
- It says to pull the latest 64 comments, meaning the newest 64 comments your account has made. If you are very active, it will likely find a much smaller number to sync.
- I filter out any stories that aren't immediate children of the post. Because of this, Prompt Me responses are not collected
- If there is a delay and the comment goes past the count before the delay is over, the story will not be synced
- I filter out stickied comments, because those are usually mod actions
Want to make the process automatic? Add this to your /etc/crontab
file!
0 7 * * * root docker-compose -f /path/to/StorySync/docker-compose.yaml up