Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evamaerey/featurette


https://github.com/evamaerey/featurette

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
comment = "#>"
)

```


# featurette git repo

The goal of featurette is to feature and test out projects and packages!

Repo: https://github.com/EvaMaeRey/featurette

```{r, results='asis', echo = F}
library(magrittr)

webpages <- fs::dir_ls(type = "file", recurse = T, glob = "*.html|*.pdf") %>% rev()
file_name_wo_extension <- webpages %>% stringr::str_remove(".html|.pdf")

webpages %>%
paste0("0. [",
. ,
"]",
"(https://evamaerey.github.io/featurette/", .,
") **[source](https://github.com/evamaerey/featurette/blob/master/",
file_name_wo_extension,".Rmd",
")**\n") %>%
cat()
```

---

# code to write new featurette

```{r, eval=FALSE}
new_experiment <- function(name){

dir <- paste0(Sys.Date(),"-", name)

dir.create(dir)
readLines("template.Rmd") |>
writeLines(con = paste0(dir,"/", name, ".Rmd"))

}

new_experiment(name = "bounding-box-question")

build_mp4 <- function(name){

# create list of htmls
webpages <- fs::dir_ls(type = "file", recurse = T, glob = "*.html") %>% rev()

# grab target html
target_html <- webpages[grep(name, webpages)][1]

# build mp4
xaringanBuilder::build_mp4(input = target_html, fps = 1.4)
# xaringanBuilder::build_pdf(input = target_html)
}

build_mp4("facet-ref-shadow")

```