{"id":24786962,"url":"https://github.com/ni5arga/dailydigestbot","last_synced_at":"2025-10-12T10:31:43.028Z","repository":{"id":198223048,"uuid":"700304450","full_name":"ni5arga/DailyDigestBot","owner":"ni5arga","description":"Reddit Daily Digest Bot is a Python-based bot that automates the compilation of top posts from specified subreddits into a daily digest. Users can customize sorting methods, time ranges, and the target subreddit for automated posting. The bot simplifies the process of staying updated on favorite subreddits by delivering a formatted summary.","archived":false,"fork":false,"pushed_at":"2025-07-20T03:01:59.000Z","size":44,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T11:46:02.297Z","etag":null,"topics":["hacktoberfest","hacktoberfest-accepted","praw","praw-api","praw-reddit","reddit","reddit-api","reddit-bot","reddit-bots","subreddit","subreddits"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ni5arga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-04T10:44:53.000Z","updated_at":"2025-07-20T03:02:02.000Z","dependencies_parsed_at":"2023-12-09T15:24:18.081Z","dependency_job_id":"aba0a1fd-73c3-48de-a0d9-dfe67468b0e2","html_url":"https://github.com/ni5arga/DailyDigestBot","commit_stats":null,"previous_names":["ni5arga/reddit-dailydigest-bot","ni5arga/dailydigestbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ni5arga/DailyDigestBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FDailyDigestBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FDailyDigestBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FDailyDigestBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FDailyDigestBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ni5arga","download_url":"https://codeload.github.com/ni5arga/DailyDigestBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ni5arga%2FDailyDigestBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011063,"owners_count":26084865,"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-10-12T02:00:06.719Z","response_time":53,"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":["hacktoberfest","hacktoberfest-accepted","praw","praw-api","praw-reddit","reddit","reddit-api","reddit-bot","reddit-bots","subreddit","subreddits"],"created_at":"2025-01-29T15:17:56.649Z","updated_at":"2025-10-12T10:31:42.706Z","avatar_url":"https://github.com/ni5arga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit Daily Digest Bot\n\n**Reddit Daily Digest Bot** is a Python bot designed to simplify the process of aggregating and sharing top posts from your favorite subreddits. It fetches the most popular posts from specified subreddits, compiles them into a neatly formatted daily digest, and automatically posts the digest to a target subreddit of your choice. Also works for hot, controversial, rising \u0026 new posts. You can also specify your own time range for the posts the bot will fetch.\n\n## Key Features\n\n- Can create daily digest of most popular posts from multiple subreddits.\n- Fetch top, hot, controversial, rising, new posts from multiple subreddits in the time frame you want.\n- Compile the fetched posts into a digest with post titles, links and author.\n- Post the digest to a designated subreddit with ease.\n\n\n## Getting Started\n\n### Prerequisites\n\nYou'll need to have the following installed on your system:\n\n- Python 3.x\n\n### Installation\n\n1. Clone this repository to your local machine:\n\n   ```bash\n   git clone https://github.com/ni5arga/DailyDigestBot.git\n   ```\n2. Change the project directory\n\n   ```bash\n   cd reddit-dailydigest-bot\n   ```\n\n3. Install Dependencies\n   ```bash\n    pip install -r requirements.txt\n   ```\n\n### Configuration \n### Reddit API Credentials\n\nOpen the `config.py` file and replace the placeholders with your Reddit API credentials:\n\n```python\nCLIENT_ID = 'your_client_id'\nCLIENT_SECRET = 'your_client_secret'\nUSER_AGENT = 'your_user_agent'\nREDDIT_USERNAME = 'your_reddit_username'\nREDDIT_PASSWORD = 'your_reddit_password'\n```\n\n### Subreddits \nModify the `SUBREDDITS` variable in `config.py` to specify the subreddits from which you want to fetch posts. Don't include r/ before the name of the subreddit.\n\n```python\nSUBREDDITS = ['science', 'technology', 'maths', 'physics']\n```\n\n### Target Subreddit \nReplace the `TARGET_SUBREDDIT` variable with the subreddit name where you want the bot to post the content:\n\n```python\nTARGET_SUBREDDIT = 'your_target_subreddit_name'\n```\n### Time Range\nUpdate the `TIME_RANGE` to the time range you need for the `controversial.py` and `top.py` script\n```python\nTIME_RANGE = 'day' \n```\n- `'day'`: Fetch top posts from the last 24 hours.\n- `'week'`: Fetch top posts from the last 7 days.\n- `'month'`: Fetch top posts from the last 30 days.\n- `'year'`: Fetch top posts from the last 365 days.\n- `'all'`: Fetch top posts from all time.\n\n### Usage\nAfter configuring it properly simply run the bot script :\n\n#### Daily Digest Script\n\n```bash \npy main.py\n```\nThe bot will fetch that day's top posts from the specified subreddits, compile them into a daily digest, and post it to the target subreddit.\n\n#### Additional Sorting Scripts\n\n- **Fetch Top Posts (top.py)**\n```bash\npython top.py\n```\nFetches and compiles the top posts from the specified subreddits based in the user specified `TIME_RANGE`.\n\n- **Fetch Rising Posts (rising.py)**\n```bash\npython rising.py\n```\nFetches and compiles the rising posts from the specified subreddits based on the daily sorting method.\n\n- **Fetch New Posts (new.py)**\n```bash \npython new.py\n```\nFetches and compiles the new posts from the specified subreddits based on the daily sorting method.\n\n- **Fetch Controversial Posts (controversial.py)**\n```bash\npython controversial.py\n```\nFetches and compiles the controversial posts from the specified subreddits based on the user specified `TIME_RANGE`.\n\n- **Fetch Hot Posts (hot.py)**\n```bash \npython hot.py\n```\nFetches and compiles the top hot posts from the specified subreddits based on the daily sorting method.\n\n\n### Auto-running the script for the daily digest\n\nTo make your Reddit Daily Digest Bot run automatically every 24 hours, you can use a scheduler like `cron` (on Unix-like systems) or Task Scheduler (on Windows). Here's how you can set up the automatic scheduling :\n\n**Automate Script Execution Every 24 Hours**\n\n1. **Linux/macOS (Using `cron`)**:\n\n   - Open your terminal.\n   - Open your crontab file for editing by running:\n\n     ```bash\n     crontab -e\n     ```\n\n   - Add the following line to schedule your script to run every 24 hours:\n\n     ```bash\n     0 0 * * * /usr/bin/python3 /path/to/your/reddit-dailydigest-bot/main.py\n     ```\n\n   - Save the file and exit.\n\n2. **Windows (Using Task Scheduler)**:\n\n   - Open the \"Task Scheduler\" application.\n   - In the right-hand pane, click on \"Create Basic Task...\".\n   - Follow the wizard to create a basic task, specifying the task name and description.\n   - Choose \"Daily\" and set the recurrence to \"1 days\".\n   - Specify the start date and time.\n   - Choose \"Start a program\" and browse to the location of your Python executable (e.g., `C:\\Python39\\python.exe`).\n   - In the \"Add arguments\" field, provide the full path to your `main.py` script (e.g., `C:\\path\\to\\your\\reddit-dailydigest-bot\\main.py`).\n   - Complete the wizard, review your settings, and click \"Finish\" to create the scheduled task.\n\n**Ensure Proper Environment Setup**\n\nMake sure that your Python environment and working directory are properly set within your script to avoid any issues when it runs as a scheduled task.\n\n**Testing and Troubleshooting**\n\nBefore scheduling the script to run automatically, test it manually to ensure it works as expected. Check the logs or output to identify and fix any issues.\n\n### Contributing\n\nContributions are welcome! If you'd like to contribute to this project, please open an issue or submit a pull request.\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE](/License) file for details.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fni5arga%2Fdailydigestbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fni5arga%2Fdailydigestbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fni5arga%2Fdailydigestbot/lists"}