{"id":19138198,"url":"https://github.com/helias/notify-me","last_synced_at":"2025-05-06T20:46:23.104Z","repository":{"id":54369962,"uuid":"80219933","full_name":"Helias/Notify-me","owner":"Helias","description":"A shell command to notify you via Telegram for Linux, Mac and Windows","archived":false,"fork":false,"pushed_at":"2021-02-22T21:45:49.000Z","size":21,"stargazers_count":51,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T14:58:00.188Z","etag":null,"topics":["bashrc","bot","notify","shell-script","sysadmin","telegram"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Helias.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}},"created_at":"2017-01-27T15:38:36.000Z","updated_at":"2025-02-05T15:02:05.000Z","dependencies_parsed_at":"2022-08-13T13:40:26.382Z","dependency_job_id":null,"html_url":"https://github.com/Helias/Notify-me","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Helias%2FNotify-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Helias%2FNotify-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Helias%2FNotify-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Helias%2FNotify-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Helias","download_url":"https://codeload.github.com/Helias/Notify-me/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769132,"owners_count":21801373,"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":["bashrc","bot","notify","shell-script","sysadmin","telegram"],"created_at":"2024-11-09T06:42:02.473Z","updated_at":"2025-05-06T20:46:23.078Z","avatar_url":"https://github.com/Helias.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notify-me\n\nA shell function that notifies you via a Telegram bot.\n\nIt's useful when you need to compile a big project (like Qt 5.6) and want to get a notification when it finishes, but it can also be used to send messages through your bot!\n\n## Usage\n\nFirst of all, if you haven't got a token (for example because you have never made a Telegram Bot) ask [BotFather](https://telegram.me/botfather), just send **/newbot** and follow the procedure. Finally take the string after **\"Use this token to access the HTTP API:\"**, it should appear similar to this:\n\n```\n318682111:AAFouzmHLujO17LY3VJUfhnp4yn8qLIo9Uw\n```\n\nIf you don't know your Telegram's **chat_id** talk to [**@GiveChatId_bot**](https://t.me/GiveChatId_bot) and send to him **/chatid**, it will write your chat_id, so put it on the configuration instead of **your_chat_id**.\n\nOr you could send a message to your own bot and then use this [link](https://api.telegram.org/bot**TOKEN**/getUpdates). You should see then that your message has been received by your bot and is listed. Traversing the json you should find a **chat** key with an **id** key inside which value is exactly your chat_id.\n\nNow the procedure differs based on which OS you're using.\n\n### Linux and macOS\n\nYou can either:\n\n1. Run the script with:\n   `bash notify.sh`\n2. Copy the script's code in your **~/.bashrc** (if this file doesn't exist create it with `$ touch ~/.bashrc`) to call it without `bash` first.\n\nIf you're using **Linux** restart the terminal or run this to apply the changes:\n\n```bash\nsource ~/.bashrc\n```\n\nIf you're using **MacOS** edit (or create) a **~/.bash_profile** and repeat the same procedure but replace all occurrencies of **~/.bashrc** with **~/.bash_profile** in the previous commands.\n\nYou can try these commands:\n\n```bash\nnotify\nsleep 3; notify \"This is a test!\"\n```\n\nthe first command should send to you the default_message (\"notify!\"), the second will send you \"This is a test!\" after 3 seconds.\n\n### Windows\n\nIf you're using **Windows** you actually have three options:\n\n1. You could make a copy of **example_config.json** in the same folder, rename it to **config.json** and insert the correct values in each field.\n   Then you could use:\n   `.\\notify.ps1 -c`\n   This will load data from the default configuration file, the one you just created!\n2. Or you could use the previous command but pass a **second argument** which will be the path to another config.json file\n3. Or you could skip the bureaucracy and pass all configurations with a **single command**:\n   `.\\notify.ps1 \u003cchat_id\u003e \u003cbot_token\u003e`\n   A third argument could be provided to change message text\n\n# Enjoy!\n\nIf you want to report something you could either:\n\n- Open an issue\n- Ask [Helias](http://telegram.me/Helias) via Telegram (Linux and macOS)\n- Ask [Lorenzo](http://telegram.me/lorenzopappalardo7) via Telegram (Windows)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelias%2Fnotify-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelias%2Fnotify-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelias%2Fnotify-me/lists"}