Last active
October 23, 2019 19:12
-
-
Save GiulSposito/62d74ea3a6e703b28167d30afecf5ba9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(glue) | |
library(lubridate) | |
post_tweet <- print | |
tribble( | |
~local, ~data_str, ~mensagem, | |
"PUC-Rio", "17/12/2019", "VAMO LÁ PORRA, JÁ TA ACABANDO!!!", | |
"UFRJ", "14/12/2019", "VAMO LÁ PORRA, DIAS MELHORES VIRÃO!!!", | |
"UERJ", "07/12/2019", "AGUENTA VAI, JÁ TA ACABANDO!!!", | |
"UFF", "20/12/2019", "DALE DALE, JÁ TA ACABANDO!!!" | |
) %>% | |
mutate( | |
data = dmy(data_str), | |
dias_restantes = data-Sys.Date(), | |
tweet_text = glue("O ano letivo na {local} acaba em: {data_str}. Falta só {dias_restantes} dias. {mensagem}") | |
) %>% | |
split(1:nrow(.)) %>% | |
map(function(each_row){ | |
Sys.sleep(1) | |
post_tweet(each_row$tweet_text) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment