knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-"#, #out.width = "100%" )
The heart of this package is a single function called textme()
that sends you a text message 📱 the instant a long-running job completes ⌛✔️.
Now you can leave the computer while it crunches away. Go get a cofee, hit the gym, or work on other things! You'll be notified exactly when your job completes 🎉.
textme is not currently on CRAN. Install the development version from github:
devtools::install_github("richpauloo/textme")
First, sign up for a free Twilio trial account.
It doesn't matter to me which road you take. Go for option 1. just to get started and to avoid ponzi-scheme vibes.
Next, set up a project and verify your number. The Twilio docs are good for this.
Then, provide information about your twilio account and the number you want to text. These variables are stored in "~/.Renviron"
for later use. The benefit of doing it this way is that it's virtually impossible to accidentally push these credentials to Github, which is likely if you save them in scripts.
library(textme) # replace the values here with your own tm_configure(twilio_sid = "AC1ffb4917879549a0f0720c0214bde131", twilio_token = "f5c8904b9af81daf3e8dda09f975c369", twilio_phone_number = "1234567890", target_phone_number = "0987654321")
The above code needs to be run only once. Now, and in future R sessions, simply throw a textme()
at the end of a long-running job (textme comes pre-loaded with a handful of fun messages):
Sys.sleep(5) # some long-running job textme() # text me when it's done!
Or, you can supply a custom message with the message
argument:
textme(message = "👹 Back to work! You're not paid to run around and drink ☕ all day!")
This package is inspired by { beepr }, and wouldn't be possible without the { twilio } package from Sean Kross, { devtools }, { roxygen2}, and RStudio.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.