{"id":20850659,"url":"https://github.com/atsyplenkov/tgme","last_synced_at":"2026-04-27T02:33:13.403Z","repository":{"id":160436977,"uuid":"366645950","full_name":"atsyplenkov/tgme","owner":"atsyplenkov","description":"Text Message Yourself in Telegram","archived":false,"fork":false,"pushed_at":"2021-05-12T10:45:17.000Z","size":56,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-06T13:07:33.713Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atsyplenkov.png","metadata":{"files":{"readme":"README.Rmd","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":"2021-05-12T08:29:54.000Z","updated_at":"2022-06-28T19:18:22.000Z","dependencies_parsed_at":"2023-06-28T21:45:50.327Z","dependency_job_id":null,"html_url":"https://github.com/atsyplenkov/tgme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/atsyplenkov/tgme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Ftgme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Ftgme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Ftgme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Ftgme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atsyplenkov","download_url":"https://codeload.github.com/atsyplenkov/tgme/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atsyplenkov%2Ftgme/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32320455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"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-18T03:10:52.180Z","updated_at":"2026-04-27T02:33:13.385Z","avatar_url":"https://github.com/atsyplenkov.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# tgme \u003cimg src='man/figures/logo.svg' align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\nThis is a very simple package with only one function `tgme`. The aim of this package is to send you a message when a job on Rstudio server is done (or on your local machine). It is a free alternative to the Rich Pauloo's [{textme}](https://github.com/richpauloo/textme) package.\n\nMany thanks to Luca Braglia for the [{telegram}](https://github.com/lbraglia/telegram), which this package relies entirely upon.\n\n\n\n```{r, echo=FALSE, fig.align=\"center\", out.width=\"50%\"}\nknitr::include_graphics(\"images/hello.png\")\n```\n\n## Installation\n\nYou can install the released version of tgme from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"tgme\")\n```\n\nAnd the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"atsyplenkov/tgme\")\n```\n## Example\n\nThis is a basic example which shows you how to solve a common problem:\n\n```{r example, message=FALSE, warning=FALSE}\nlibrary(tgme)\n## basic example code\ntgme(\"This is your text\")\n```\n\n## Set Up\n### I. Telegram\n1. Install Telegram\n2. Find and start [`BotFather`](https://telegram.me/botfather)\n3. Type `/newbot` and follow the instructions.\n4. You need to remember and keep your: **`bot_name`** (it's the first question you've answered to the botfather) and **TOKEN** to access the HTTP API. The **TOKEN** will look smth like `123123:asdasdasd`.\n5. Then you need to get your **`chat_id`**, i.e. your personal user ID.\n  - Write something to your bot. For example \"Test\".\n  - Then, go to your browser and go to `https://api.telegram.org/bot**TOKEN**/getUpdates`. Replace word TOKEN with your actual token number. For example if your's token is `1234FF`, then you should go to `https://api.telegram.org/bot1234FF/getUpdates`\n  - In your browser you will see following lines (depending on how many messages did you send). Sometimes you should write twice to your bot.\n  `{\"ok\":true,\"result\":[{\"update_id\":1234,\n\"message\":{\"message_id\":3,\"from\":{**\"id\":1234**,\"is_bot\":false,\"first_name\":\"Name\",\"last_name\":\"Surname\",\"username\":\"username\",\"language_code\":\"en\"},\"chat\":{\"id\":1234,\"first_name\":\"Name\",\"last_name\":\"Surname\",\"username\":\"username\",\"type\":\"private\"},\"date\":124,\"text\":\"Test\"}}`\n  - The `\"id\"` variable is what we are looking for. Therefore **1234** is your **`chat_id`**.\n\n### II. R\n1. Install [{telegram}](https://github.com/lbraglia/telegram) package.\n2. Run `usethis::edit_r_environ()` to update your `.Renviron`.\n3. Add line with your telegram **bot_name** and TOKEN:\n  `R_TELEGRAM_BOT_bot_name=123123:asdasdasd`\n  For example if your Bot's name is `ExampleBot` and your token is `1234FF`, then you need to add `R_TELEGRAM_BOT_ExampleBot=1234FF` to your `.Renviron`.\n4. Add line with your telegram **`user_name`** and **chat_id**:\n`R_TELEGRAM_USER_user_name=chat_id`\nFor example if your **`user_name`** is `me` and your **chat_id** is `1234`, then you need to add `R_TELEGRAM_USER_me=1234` to your `.Renviron`.\n5. Restart `R` session for changes to take effect\n\n### III. Enjoy\nNow you can send yourself a message for free, when the R job is done. Try:\n\n```{r measure, message=FALSE, warning=FALSE}\nlibrary(tgme)\nlibrary(tictoc)\n\ntic()\nSys.sleep(5)\nfin \u003c- toc()\n\n\ntgme(text = paste0(\"Job is done for \",\n                   round(fin$toc-fin$tic),\n                   \" sec\"),\n     bot_name = \"rstudio_server\",\n     user_name = \"me\")\n```\n\n\n```{r, echo=FALSE, fig.align=\"center\", out.width=\"50%\"}\nknitr::include_graphics(\"images/telegram_not.png\")\n```\n\nIf something is not clear, then read the [{telegram}](https://github.com/lbraglia/telegram) readme for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatsyplenkov%2Ftgme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatsyplenkov%2Ftgme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatsyplenkov%2Ftgme/lists"}