{"id":19700232,"url":"https://github.com/dbeley/reddit_bestof","last_synced_at":"2026-06-09T02:34:09.220Z","repository":{"id":98542461,"uuid":"407351073","full_name":"dbeley/reddit_bestof","owner":"dbeley","description":"Create and send Reddit BestOf reports.","archived":false,"fork":false,"pushed_at":"2025-06-09T19:56:25.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T20:31:21.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbeley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-17T00:15:55.000Z","updated_at":"2025-06-09T19:56:29.000Z","dependencies_parsed_at":"2023-03-21T03:18:51.930Z","dependency_job_id":null,"html_url":"https://github.com/dbeley/reddit_bestof","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbeley/reddit_bestof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Freddit_bestof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Freddit_bestof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Freddit_bestof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Freddit_bestof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbeley","download_url":"https://codeload.github.com/dbeley/reddit_bestof/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbeley%2Freddit_bestof/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285722810,"owners_count":27220618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-22T02:00:05.934Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T21:04:50.898Z","updated_at":"2025-11-22T02:04:12.452Z","avatar_url":"https://github.com/dbeley.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reddit_bestof\n\n![Build Status](https://github.com/dbeley/reddit_bestof/workflows/CI/badge.svg)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3122059a1f6548bd872ba1d583e4c2e9)](https://www.codacy.com/gh/dbeley/reddit_bestof/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=dbeley/reddit_bestof\u0026amp;utm_campaign=Badge_Grade)\n\n`reddit_bestof` is a python tool used to generate reddit best-of reports.\n\nYou can see it in action here:\n\n-   [**/r/BestOfFrance**](https://reddit.com/r/bestoffrance)\n-   [**/r/BestOfRance**](https://reddit.com/r/bestofrance)\n-   [**/r/BestOfFrance2**](https://reddit.com/r/bestoffrance2) (inactive)\n\nIt is intended to be run every day at 9 pm. It will:\n\n-   extract the activity of a subreddit for the period (last day from yesterday 9 pm to today 9 pm, last month, last year)\n-   create a report from a template\n-   export the report to a text file\n-   (optional) send it to a new post in a subreddit of your choice\n-   (optional) notify the users mentioned in the report\n\nIt is designed to be as generic as possible so it should work with any subreddit.\n\n## Configuration\n\nRename `praw_sample.ini` to `praw.ini` and put your informations in it. You can create an API dev script at https://old.reddit.com/prefs/apps/.\n\n## Installation\n\nClassic installation:\n```bash\ngit clone https://github.com/dbeley/reddit_bestof\ncd reddit_bestof\npython setup.py\n```\n\nInstallation in a virtualenv (with pipenv):\n```bash\ngit clone https://github.com/dbeley/reddit_bestof\ncd reddit_bestof\npipenv install '-e .'\n```\n\n## Usage\n\n```bash\nreddit_bestof -h\n```\n\n```text\nusage: reddit_bestof [-h] [--debug] -s SUBREDDIT -f TEMPLATE_FILE -t\n                     TEMPLATE_FILE_TITLE [-m TEMPLATE_FILE_MESSAGE] [-d DAY]\n                     [-p POST_SUBREDDIT] [--no_posting] [--test]\n                     [--notify_winners]\n\nCreate and send Reddit BestOf reports.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -s SUBREDDIT, --subreddit SUBREDDIT\n                        Subreddit (required, without prefix, example: france)\n  -f TEMPLATE_FILE, --template_file TEMPLATE_FILE\n                        Template file containing the content of the post\n                        (required)\n  -t TEMPLATE_FILE_TITLE, --template_file_title TEMPLATE_FILE_TITLE\n                        Template file containing the title of the post\n                        (required)\n  -m TEMPLATE_FILE_MESSAGE, --template_file_message TEMPLATE_FILE_MESSAGE\n                        Template file containing the message for the winner's\n                        notification (required if --notify_winners is set)\n  -d DAY, --day DAY     Report day in format YYYY-MM-DD (optional, if not set:\n                        current day)\n  -p POST_SUBREDDIT, --post_subreddit POST_SUBREDDIT\n                        Subreddit to send the formatted message to (without\n                        prefix, example: bestoffrance2)\n  --no_posting          Disable posting to Reddit\n  --test                Use a very small subset of data\n  --notify_winners      Send a message to winners\n```\n\n### Example\n\nCreate a report for `/r/france` for the current day using `template_post.txt` as post template, `template_title.txt` as title template, `template_message.txt` as message template and post it to `/r/bestoffrance2`:\n```bash\nreddit_bestof -s france -p bestoffrance2 -f template_post.txt -t template_title.txt -m template_message.txt\n```\n\n### Templates\n\nThe script uses three templates:\n\n-   post content\n-   post title\n-   winner message\n\nSee the `templates` folder for examples.\n\n## Systemd-service\n\nYou can schedule the script to run every day at a specific time (by default 21:00). You will need to modify `reddit_bestof.service` to reflect your configuration.\n\n```bash\ncp systemd-service/* ~/.config/systemd/user\nsystemctl --user daemon-reload\nsystemctl --user enable --now reddit_bestof.timer # enable the timer\nsystemctl --user start reddit_bestof # you can also run the service manually\n```\n\n## Scripts\n\n-   `manually_send_report.py`: manually send a report created with `reddit_bestof`\n\n```bash\npython manually_send_report.py -h\n```\n\n```text\nusage: manually_send_report.py [-h] [--debug] -p POST_SUBREDDIT -f FILE\n                               [--no_posting]\n\nSend a BestOf report to reddit.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --debug               Display debugging information\n  -p POST_SUBREDDIT, --post_subreddit POST_SUBREDDIT\n                        Subreddit to send the formatted message to (required,\n                        without prefix, example: bestoffrance2)\n  -f FILE, --file FILE  File containing the content of the post\n  --no_posting          Disable posting to reddit\n```\n\n## TODO\n\n-   add records for each category\n-   add gilded comments\n-   improve datetime handling\n-   notify all mentioned users\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Freddit_bestof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbeley%2Freddit_bestof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbeley%2Freddit_bestof/lists"}