README.md

twitterbot

R-CMD-check

Project Status: WIP – Initial development is in progress, but there
has not yet been a stable, usable release suitable for the
public.

This package accesses documents from open archives and tweets the latest scientific publications of your team (see it in action: @archeosciences).

Installation

You you can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("crp2a/twitterbot")

Usage

library(twitterbot)

twitterbot currently supports:

You can schedule a cron job with cronR or use GitHub actions to schedule tweets on a daily basis.

Tweet your latest publications

## Set the path of the log file
## This file ensures that no document is tweeted twice
path <- file.path(Sys.getenv("HOME"), "hal.log")

## Get documents from HAL
hal <- get_hal_team(id = "399901", limit = 100)

## Post the last ten publications
post(hal, log = path, select = 1:10)

New publication: “Multi-millennial human impacts and climate change during the Maya early Anthropocene: implications on hydro-sedimentary dynamics and socio-environmental trajectori…” #EnvironmentalStudies #Archaeology #Geography https://doi.org/10.1016/j.quascirev.2022.107458

Tweet news from your website

## Set the path of the log file
## This file ensures that no document is tweeted twice
path <- file.path(Sys.getenv("HOME"), "rss.log")

## Get news items
url <- "https://www.archeosciences-bordeaux.fr/spip.php?page=backend-breves"
rss <- get_rss(feed = url)

## Post the last ten items
post(rss, log = path, select = 1:10)

En direct du labo : Séminaire Chronologies Africaines #Géochronologie #Archéologie #Afrique #JournéeDétude https://www.archeosciences-bordeaux.fr/+Seminaire-Chronologies-Africaines+

Code of Conduct

Please note that the twitterbot project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



nfrerebeau/twitterbot documentation built on Jan. 30, 2023, 1:12 p.m.