The gist is the implementation of a bot that uses my summary service to generate comments on reddit. It's poorly commented so I'll document it below.
Segment | Purpose |
---|---|
Lines 13-15 | Probably redundant, but these filter out any other user aside from u/autodldr |
Lines 18-20 | Restricts the bot to summarising only posts created today. This is enforced by the cronjob that triggers the bot |
Line 28 | filters the subreddit's posts by date and user. Not sure if the user is necessary, but I'm being safe. |
Lines 31-32 | Find the link to the original article in the selected post |
Line 42 | Generates markdown for the comment | Line 44 | Adds the comment to the subreddit |
No comments:
Post a Comment