diff --git a/.Rbuildignore b/.Rbuildignore index e5f4c0b..97eec7f 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,6 +1,7 @@ ^readMDTable\.Rproj$ ^\.Rproj\.user$ ^LICENSE\.md$ +^data-raw$ ^\.github$ ^_pkgdown\.yml$ ^docs$ diff --git a/README.Rmd b/README.Rmd index 4e6d7ee..db551a2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -10,7 +10,8 @@ knitr::opts_chunk$set( ) ``` -# readMDTable +# readMDTable readMDTable website + [![R-CMD-check](https://github.com/jrdnbradford/readMDTable/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jrdnbradford/readMDTable/actions/workflows/R-CMD-check.yaml) [![Dev status](https://img.shields.io/github/r-package/v/jrdnbradford/readMDTable/main?label=Dev%20Version&logo=github&labelColor=3e474f&logoColor=959da5)](https://github.com/jrdnbradford/readMDTable) diff --git a/README.md b/README.md index 88beb52..d714bd6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# readMDTable +# readMDTable readMDTable website diff --git a/data-raw/stickers/logo-raw.png b/data-raw/stickers/logo-raw.png new file mode 100644 index 0000000..c33afc2 Binary files /dev/null and b/data-raw/stickers/logo-raw.png differ diff --git a/data-raw/stickers/logo.R b/data-raw/stickers/logo.R new file mode 100644 index 0000000..9ed7a28 --- /dev/null +++ b/data-raw/stickers/logo.R @@ -0,0 +1,49 @@ +library(gridExtra) +library(grid) +library(magick) +library(hexSticker) +library(tibble) + +raw_logo_path <- file.path("data-raw", "stickers", "logo-raw.png") + +table_data <- tibble( + Feature = c("Name", "Title", "License", "GitHub"), + Description = c("Package name", "Package title", "License type", "Repository Link"), + Value = c("{readMDTable}", "Read Markdown Tables\ninto Tibbles", "GPL >= 3", "jrdnbradford/readMDTable") +) + +table_grob <- tableGrob(table_data, rows = NULL) + +png(raw_logo_path, width = 800, height = 600) +grid.newpage() +grid.draw(table_grob) +dev.off() + +# See https://github.com/GuangchuangYu/hexSticker/issues/39 +transparent_logo <- image_read(raw_logo_path) %>% + image_fill(color = "transparent", refcolor = "white", fuzz = 4, point = "+1+1") %>% + image_fill(color = "transparent", refcolor = "white", fuzz = 4, point = "+517+1") %>% + image_fill(color = "transparent", refcolor = "white", fuzz = 4, point = "+1+599") %>% + image_fill(color = "transparent", refcolor = "white", fuzz = 4, point = "+517+599") + +image_write(image = transparent_logo, path = raw_logo_path) + +sticker( + raw_logo_path, + package = "{readMDTable}", + p_size = 18, + p_y = 1.3, + p_color = "black", + s_x = 1, + s_y = 0.80, + s_width = 1.65, + s_height = 100, + h_fill = "white", + h_color = "#ff79c6", + dpi = 300, + filename = raw_logo_path +) + +file.show(raw_logo_path) + +usethis::use_logo(raw_logo_path) diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000..37e8da3 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/man/readMDTable-package.Rd b/man/readMDTable-package.Rd index 9b01e8e..a656d2e 100644 --- a/man/readMDTable-package.Rd +++ b/man/readMDTable-package.Rd @@ -6,6 +6,8 @@ \alias{readMDTable-package} \title{readMDTable: Read Markdown Tables into Tibbles} \description{ +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} + Read markdown tables from a string, file, or URL into tibbles. } \seealso{