{"id":15975983,"url":"https://github.com/gadenbuie/gathertweet","last_synced_at":"2025-03-18T00:30:55.460Z","repository":{"id":76832862,"uuid":"167423481","full_name":"gadenbuie/gathertweet","owner":"gadenbuie","description":"Commandline utility for quick {rtweet} tweet gathering","archived":false,"fork":false,"pushed_at":"2021-10-29T04:03:49.000Z","size":36,"stargazers_count":8,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T16:11:20.475Z","etag":null,"topics":["cli","command-line-tool","rstats","rstats-twitter","rtweet"],"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/gadenbuie.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":"2019-01-24T19:21:53.000Z","updated_at":"2024-03-14T02:39:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"795c4246-813a-4fa6-8a68-d9f2fb91df78","html_url":"https://github.com/gadenbuie/gathertweet","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"2d87157e451957e64d4e8bf7c132af4f60335f78"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fgathertweet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fgathertweet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fgathertweet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fgathertweet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gadenbuie","download_url":"https://codeload.github.com/gadenbuie/gathertweet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244133758,"owners_count":20403486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","command-line-tool","rstats","rstats-twitter","rtweet"],"created_at":"2024-10-07T22:06:42.667Z","updated_at":"2025-03-18T00:30:55.447Z","avatar_url":"https://github.com/gadenbuie.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 setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  cache = FALSE,\n  comment = \"\",\n  prompt = TRUE,\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nif (dir.exists(\".tmp\")) unlink(\".tmp\", recursive = TRUE)\ndir.create(\".tmp/rstats\", recursive = TRUE, showWarnings = FALSE)\nknitr::opts_knit$set(root.dir = \".tmp/rstats\")\n```\n\n[rtweet]: https://rtweet.info\n[cron]: https://en.wikipedia.org/wiki/Cron\n\n\u003ch1 style=\"font-weight: normal;\"\u003egathe\u003cstrong\u003ertweet\u003c/strong\u003e\u003c/h1\u003e\n\nThe goal of gathertweet is to provide a simple command line utility that wraps key functions from [rtweet].\n\nThe magic of **gathertweet** is that it grants you the power to **quickly set up twitter monitoring and tweet gathering** while saving you from the pain of **writing a bunch of boilerplate code** to \n\n- save new tweets without losing previously collected tweets, \n- join multiple searches, \n- update tweet stats, \n- simplify stored tweets,\n- schedule easily with [cron],\n- and more...\n\ngathe**rtweet** is a thin wrapper around [rtweet], the excellent R interface to Twitter written by [Mike Kearney](https://mikewk.com/).\nIf you use gathertweet, please ensure that you [cite rtweet directly](https://rtweet.info/authors.html).\n\n```{r}\ncitation(\"rtweet\")\n```\n\n## Installation\n\nThis is a work in progress and may not work well for you yet.\nBut you are welcome to install **gathertweet** and try it out.\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"gadenbuie/gathertweet\")\n```\n\nOnce you've installed the package, you need to run\n\n```r\ngathertweet::install_gathertweet()\n```\n\nwhich adds `gathertweet` to `/usr/local/bin` as a symlink (you can adjust where this link is created in `install_gathertweet()`).\nIf you need admin rights to install, try \n```\nsudo Rscript -e \"gathertweet::install_gathertweet()\"\n``` \nfrom the command line.\n\n\n## Example\n\n### Use gathertweet from the command line\n\nCreate a directory to store tweets\n\n```bash\nmkdir rstats\ncd rstats\n```\n\n```{r include=FALSE}\nknitr::opts_knit$set(root.dir = \".tmp/rstats\")\n```\n\nGet 100 #rstats tweets\n\n```{bash}\ngathertweet search --n 100 --quiet \"#rstats\"\n```\n\nGet more tweets, automatically starting from end of the last search\n\n```{r include=FALSE}\nSys.sleep(60)\n```\n\n```{bash}\ngathertweet search --n 100 --quiet \"#rstats\"\n```\n\nUpdate the stored data about those #rstats tweets\n\n```{bash}\ngathertweet update\n```\n\n```{bash}\nls -lh\n```\n\nGather user timelines\n\n```{bash}\ngathertweet timeline hadleywickham jennybryan dataandme\n```\n\n### Schedule tweet gathering using cron\n\nThe primary use case of gathertweet is to make it easy to set up [cron] to periodically gather tweets.\nHere's a simple example to download all tweets matching the search term `rstats OR tidyverse` every night at midnight.\nThe tweets are stored, by default, in `tweets.rds` in `~/rstats-tweets`.\n\n```bash\ncrontab -e\n\n# m h dom mon dow   command\n0 0 * * * (cd ~/rstats-tweets \u0026\u0026 ~/bin/gathertweet search --polite 'rstats OR tidyverse' \u003e\u003egathertweet.log)\n```\n\n## Documentation\n\n```bash\n\u003e gathertweet --help\n```\n\n```{bash gathertweet_help, echo=FALSE}\n../../inst/gathertweet.R --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fgathertweet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgadenbuie%2Fgathertweet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fgathertweet/lists"}