{"id":17383155,"url":"https://github.com/drhdev/totelegram","last_synced_at":"2026-04-20T05:36:23.394Z","repository":{"id":228671019,"uuid":"774621379","full_name":"drhdev/totelegram","owner":"drhdev","description":"The totelegram shellscript enables automated sending of files or their contents as messages to a Telegram chat using a bot, complete with logging, cron job support, and configurable verbosity for monitoring and notification purposes.","archived":false,"fork":false,"pushed_at":"2024-03-19T22:02:52.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T20:49:36.163Z","etag":null,"topics":["bash","bash-script","filesender","filetransfer","linux","message","notification","server","shell","shell-script","shellscript","telegram","telegram-api","telegram-bot","telegram-bot-api","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drhdev.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}},"created_at":"2024-03-19T21:48:12.000Z","updated_at":"2024-07-01T21:46:47.000Z","dependencies_parsed_at":"2024-03-19T22:46:28.991Z","dependency_job_id":"a346c6a5-e0d9-4386-998a-53b800b61df4","html_url":"https://github.com/drhdev/totelegram","commit_stats":null,"previous_names":["drhdev/totelegram"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/drhdev/totelegram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Ftotelegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Ftotelegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Ftotelegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Ftotelegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drhdev","download_url":"https://codeload.github.com/drhdev/totelegram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drhdev%2Ftotelegram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32034991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["bash","bash-script","filesender","filetransfer","linux","message","notification","server","shell","shell-script","shellscript","telegram","telegram-api","telegram-bot","telegram-bot-api","ubuntu"],"created_at":"2024-10-16T07:40:48.241Z","updated_at":"2026-04-20T05:36:23.376Z","avatar_url":"https://github.com/drhdev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# totelegram\n\n`totelgram` is a versatile Bash script designed to enhance communication by automating the sending of files or file contents as messages directly to a Telegram chat. Utilizing a Telegram bot, this script is perfect for anyone looking to automate alerts, share logs, or send documents and updates within a Telegram chat environment. Its features include detailed logging, cron job support for scheduled sending, and a verbose output option for real-time operation monitoring, all wrapped in a user-friendly interface.\n\n## Features\n\n- **Send Files as Attachments:** Directly send any file as an attachment to your designated Telegram chat.\n- **Send Text Content as Messages:** Automatically send the text content of files as Telegram messages, ideal for logs and text updates.\n- **Comprehensive Logging:** Maintains detailed logs for every action performed by the script, ensuring traceability and accountability.\n- **Cron Job Support:** Facilitates easy integration with cron for scheduling, making it perfect for regular updates or backups.\n- **Verbose Output:** Offers an optional verbose output mode for detailed insights into the script's operations, while maintaining a silent mode ideal for background tasks.\n- **Configurable for Your Needs:** Easily set up with your specific Telegram Bot token and Chat ID for personalized use.\n\n## Getting Started\n\n### Prerequisites\n\nEnsure you have `curl` installed on your system, as it's required for the script to communicate with the Telegram API.\n\n### Installation\n\n1. Clone the repository:\n\n```sh\ngit clone https://github.com/drhdev/totelegram.git\n```\n\n2. Navigate to the script directory:\n\n```sh\ncd totelegram\n```\n\n3. Make the script executable:\n\n```sh\nchmod +x totelegram.sh\n```\n\n4. Edit `totelgram.sh` to include your Telegram bot's token and the target Chat ID. These are clearly marked near the beginning of the script.\n\n## Usage\n\nThe script offers flexibility with two primary functions: sending files as attachments and sending file contents as messages.\n\n### Send a File as an Attachment\n\n```sh\n./totelgram.sh -file \u003cpath_to_file\u003e [--verbose]\n```\n\n### Send File Content as a Message\n\n```sh\n./totelgram.sh -message \u003cpath_to_file\u003e [--verbose]\n```\n\n### Help and Options\n\nFor a detailed list of options:\n\n```sh\n./totelgram.sh -help\n```\n\n### Scheduling with Cron\n\nTo run the script at scheduled times (e.g., daily at 2 AM), add it to your crontab:\n\n```crontab\n0 2 * * * /absolute/path/to/totelgram.sh -file \u003cfile_path\u003e \u003e\u003e /var/log/totelgram/cron.log 2\u003e\u00261\n```\n\nAdjust the command according to your needs and filepath.\n\n## Logging\n\nLogs are generated at `/var/log/totelegram/totelgram.log`, providing detailed information on each operation, including file names, timestamps, and the Telegram chat ID involved.\n\n## Contributing\n\nContributions are very welcome! Whether you have enhancements, bug fixes, or suggestions, please feel free to fork the repository, make your changes, and submit a pull request.\n\n## License\n\nThis project is licensed under the GNU Public License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nIf you encounter any issues or have questions, please don't hesitate to open an issue on the [GitHub issue tracker](https://github.com/drhdev/totelegram/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhdev%2Ftotelegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrhdev%2Ftotelegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrhdev%2Ftotelegram/lists"}