{"id":26522401,"url":"https://github.com/l1ve4code/telegram-post-generator","last_synced_at":"2025-06-17T22:02:33.006Z","repository":{"id":283549188,"uuid":"952024926","full_name":"l1ve4code/telegram-post-generator","owner":"l1ve4code","description":"Automatically generate and post motivational content to a Telegram channel.","archived":false,"fork":false,"pushed_at":"2025-04-24T18:20:06.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T22:02:22.619Z","etag":null,"topics":["ai","deepseek","python","telegram","telethon"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l1ve4code.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,"zenodo":null}},"created_at":"2025-03-20T16:02:06.000Z","updated_at":"2025-04-24T18:20:09.000Z","dependencies_parsed_at":"2025-04-24T19:23:44.626Z","dependency_job_id":"73816cc5-d3d2-4e73-a39e-b835685d0124","html_url":"https://github.com/l1ve4code/telegram-post-generator","commit_stats":null,"previous_names":["l1ve4code/telegram-post-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/l1ve4code/telegram-post-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ve4code%2Ftelegram-post-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ve4code%2Ftelegram-post-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ve4code%2Ftelegram-post-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ve4code%2Ftelegram-post-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l1ve4code","download_url":"https://codeload.github.com/l1ve4code/telegram-post-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l1ve4code%2Ftelegram-post-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260447621,"owners_count":23010541,"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","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":["ai","deepseek","python","telegram","telethon"],"created_at":"2025-03-21T13:26:53.859Z","updated_at":"2025-06-17T22:02:27.336Z","avatar_url":"https://github.com/l1ve4code.png","language":"Python","readme":"# telegram-post-generator\n\n## About\n\n- **Purpose**: Automatically generate and post motivational content to a Telegram channel.\n- **Key Features**:\n  - Generates motivational quotes, facts, tips, and calls to action using AI.\n  - Posts content with images to a Telegram channel.\n  - Schedules posts every 3 hours.\n  - Handles errors and reconnects automatically.\n\n### Technologies\n\n* Language: **Python**\n* Libraries: **Telethon, Requests, Schedule, Asyncio**\n* Deployment: **Docker, Docker Compose**\n* API: **Telegram API, Hugging Face API (or DeepSeek API)**\n\n## Installing\n\n### Clone the Project\n\n```shell\ngit clone https://github.com/l1ve4code/telegram-post-generator.git\n```\n\n### Replace Placeholders in `docker-compose.yml`\n\n```yaml\nservices:\n  telegram-autoposter:\n    build: .\n    container_name: telegram-autoposter\n    network_mode: host\n    environment:\n      - THEME=YOUR_THEME\n      - LINK=YOUR_LINK\n      - API_KEY=YOUR_API_KEY\n      - API_ID=YOUR_API_ID\n      - API_HASH=YOUR_API_HASH\n      - CHANNEL_ID=YOUR_CHANNEL_ID\n    restart: unless-stopped\n```\n\n## Running the Project\n\n### Using Docker Compose\n\n1. Build and start the container:\n\n```shell\ndocker-compose up --build\n```\n\n2. Stop the container:\n\n```shell\ndocker-compose down\n```\n\n### Running Locally\n\n1. Install dependencies:\n\n```shell\npip install -r requirements.txt\n```\n\n2. Run the script:\n\n```shell\npython main.py\n```\n\n## How It Works\n\n1. **Content Generation**:\n   - The script uses an AI API (Hugging Face or DeepSeek) to generate motivational quotes, facts, tips, and calls to action.\n   - The generated content is formatted into a post with Markdown and emojis.\n\n2. **Posting to Telegram**:\n   - The script sends the generated post along with an image to the specified Telegram channel using the `Telethon` library.\n   - It handles errors such as network interruptions and reconnects automatically.\n\n3. **Scheduling**:\n   - Posts are scheduled every 3 hours using the `schedule` library.\n   - The script runs continuously, checking for new posts to send.\n\n4. **Session Management**:\n   - The session file (`session_file`) is used to maintain the Telegram connection, ensuring that the bot stays logged in.\n\n## Author\n\n* Telegram: **[@live4code](https://t.me/live4code)**\n* Email: **steven.marelly@gmail.com**\n\nGood luck with your Telegram AutoPoster! 🚀","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1ve4code%2Ftelegram-post-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl1ve4code%2Ftelegram-post-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl1ve4code%2Ftelegram-post-generator/lists"}