Skip to content

benmarwick/archaepaperswithcode

 
 

Repository files navigation

Twitter bot posting archaeology papers with R code

.github/workflows/archaepaperswithcode.yml .github/workflows/archaepapersoncode.yml Launch Rstudio Binder Twitter

This twitter bot runs from two simple R scripts:

  1. When there is an update to our list of archaeology papers with R code https://github.com/benmarwick/ctv-archaeology#publications-that-include-r-code, the script here posts a tweet with details of the new paper.
  2. Independant of that list, every 30 days the script posts a tweet with details of an informative article about how to make research more reproducible. The article is drawn from this Zotero Group Library

The bot tweets at https://twitter.com/archpaperscode and toots at https://archaeo.social/@archpaperscode

How this works

When an update is made to https://github.com/benmarwick/ctv-archaeology#publications-that-include-r-code, GitHub Actions runs on that repository and triggers a run of GitHub Actions on this repository. GitHub Actions runs the R code in the script file on this repository, which analyses the commit history of the repo with the list of papers, extracts the text that was just added, and composes and posts a tweet with that text.

To post to Twitter from GitHub Actions, the Twitter App needs to be generated with elevated access to the V2 API (read and write) - apply for access from essential after generation. Once you have set up the twitter account, you need to set the 4 keys referred to in the R script as secrets in the github repo settings.

License

MIT for code

About

An R script which makes a twitter bot tweet new archaeology papers that include R code

Resources

License

Stars

Watchers

Forks

Languages

  • R 98.2%
  • Dockerfile 1.8%