{"id":16277090,"url":"https://github.com/eliocamp/spindler","last_synced_at":"2025-03-20T01:33:03.126Z","repository":{"id":84292382,"uuid":"190823323","full_name":"eliocamp/spindler","owner":"eliocamp","description":"Compose and publish twitter threads from the comfort of your R session or from rmarkdown rendering. ","archived":false,"fork":false,"pushed_at":"2023-01-12T18:49:01.000Z","size":250,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T13:59:22.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eliocamp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-06-07T23:26:36.000Z","updated_at":"2023-01-12T12:29:30.000Z","dependencies_parsed_at":"2023-03-04T22:30:54.049Z","dependency_job_id":null,"html_url":"https://github.com/eliocamp/spindler","commit_stats":{"total_commits":53,"total_committers":1,"mean_commits":53.0,"dds":0.0,"last_synced_commit":"e6a11b2274fd9c9dfce015c3b6c78a89222b03b7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspindler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspindler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspindler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eliocamp%2Fspindler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eliocamp","download_url":"https://codeload.github.com/eliocamp/spindler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865978,"owners_count":16555922,"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":[],"created_at":"2024-10-10T18:52:34.083Z","updated_at":"2024-10-27T21:04:03.939Z","avatar_url":"https://github.com/eliocamp.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# spindler \u003cimg src='man/figures/logo.png' align=\"right\" height=\"276\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n\u003c!-- badges: end --\u003e\n\nThe goal of spindler is to extend reproducible reporting to Twitter threads. Simply by adding a few lines into a rmarkdown document, you can publish a thread with selected results and short comments. \n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com) with:\n\n\u003c!-- the released version of spindler from [CRAN](https://CRAN.R-project.org) with:\n\n``` r\ninstall.packages(\"spindler\")\n```\n\nAnd  --\u003e \n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"eliocamp/spindler\")\n```\n\n## Setup\n\nSpinder uses [rtweet](https://rtweet.info) to publish your tweets, so you'll need to \ngo over its basic configuration of [obtaining and using access tokens](https://rtweet.info/articles/auth.html).\n\n### Manually crafted:\n\n```r\nbirds \u003c- spindler::thread$new()\nbirds$add_post(\"Hey, people, I want to tell you how awesome birds are!\")$\n  add_post(\"They have feathers, and (most of them) can fly!\")$\n  add_post(\"And look how cute they ares\", media = \"~/Pictures/penguin1.png\")\n```\n\nTake a look at it either in plain text format by printing it:\n\n```r\nbirds\n#\u003e 1: Hey, people, I want to tell you how awesome birds are!\n#\u003e    | \n#\u003e 2: They have feathers, and (most of them) can fly!\n#\u003e    | \n#\u003e 3: And look how cute they ares\n#\u003e    /home/elio/Pictures/penguin1.png\n#\u003e    |\n```\n\nOr with a shiny app: \n\n```r\nbirds$preview()\n```\n\n![](man/figures/preview-screenshot.png)\n\n\nAll looks good, let's publish it and open it in a browser. \n\n```r\nbirds$publish()\nbirds$browse()\n```\n\nOh, no I made a typo. Quick, delete the whole thing!\n```{r}\nbirds$destroy()\n```\n\nLet's start over\n\n```{r}\nbirds$clear()$\n  add_post(\"Nooo! I had an awesome thread about birds, but I messed up.\")$\n  add_post(\"So here's the jist of it: birds rock and they are better than monkeys!\")$\n  publish()\n```\n\n\n### From knitr\n\nCreate a new thread object with a tag assigned. \n\n````r\n```{r, setup}\nthis_thread \u003c- spindler::thread$new(tag = \"tw_status\")\n```\n````\n\nNow if you add the `tw_status` option to a chunk with the text you want to tweet, it will be added to the thread along with its first figure (if there is one) during the rendering process.\n\n````r\n```{r, tw_status = \"The relationship between pressure and temperature is cool!\"}\nplot(pressure)\n```\n````\n\nYou can also use `this_thread$add_post()` inside your knitr document to add posts manually. At the point where you want to publish your post, do it from inside a new chunk. It's recomended that you also save your thread. \n\n````r\n```{r}\nthis_thread$publish()$save()$browse()\n```\n````\n\nAfterwards you can load the latests saved thread with `thread$new()$load()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fspindler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliocamp%2Fspindler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliocamp%2Fspindler/lists"}