From 45854ee0a6019c9dcd30a2a4e1d1e06f5265153b Mon Sep 17 00:00:00 2001 From: Trevor L Davis Date: Fri, 8 Oct 2021 07:58:59 -0700 Subject: [PATCH] chore: Add a basic logo --- .Rbuildignore | 3 +++ .gitignore | 2 ++ README.rst | 5 +++++ Rakefile | 6 ++++++ man/figures/logo.png | Bin 0 -> 1030 bytes man/figures/logo.svg | 23 +++++++++++++++++++++++ raw-data/logo.R | 29 +++++++++++++++++++++++++++++ 7 files changed, 68 insertions(+) create mode 100644 Rakefile create mode 100644 man/figures/logo.png create mode 100644 man/figures/logo.svg create mode 100644 raw-data/logo.R diff --git a/.Rbuildignore b/.Rbuildignore index ffcbd0f..b4a959a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,5 +1,6 @@ CONTRIBUTING README.rst +^README.html$ cran-comments.rst .travis.yml ^\.appveyor\.yml$ @@ -7,3 +8,5 @@ cran-comments.rst ^_pkgdown.yml$ ^.lintr$ ^\.github$ +^pkgdown$ +^raw-data$ diff --git a/.gitignore b/.gitignore index 3afbecc..a68c1f1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ *.timestamp argparse.rst README.md +README.html revdep +pkgdown diff --git a/README.rst b/README.rst index e6a167f..c1f0601 100644 --- a/README.rst +++ b/README.rst @@ -17,6 +17,11 @@ argparse: Command line optional and positional argument parser :target: https://cran.r-project.org/package=argparse :alt: RStudio CRAN mirror downloads +.. raw:: html + + argparse hex sticker + + ``argparse`` is an R package which provides a command line parser to be used with Rscript to write "#!" shebang scripts that gracefully accept positional and optional arguments and automatically generate usage. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..f9f792a --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +desc "Build files for packaging" +task :default do + sh 'rst2html README.rst README.html' + sh 'pandoc -t markdown_strict -o README.md README.rst' + sh 'Rscript -e "pkgdown::build_site()"' +end diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000000000000000000000000000000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git a/raw-data/logo.R b/raw-data/logo.R new file mode 100644 index 0000000..fc760fc --- /dev/null +++ b/raw-data/logo.R @@ -0,0 +1,29 @@ +library("bittermelon") +library("grid") +library("piecepackr") + +font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon") +font <- read_hex(font_file) +argparse <- as_bm_bitmap("argparse", font = font) +hashbang <- as_bm_bitmap("#!", font = font) + +draw_logo <- function() { + hex <- pp_shape("convex6") + grid.newpage() + grid.draw(hex$shape(gp = gpar(col = NA, fill = "gold"))) + plot(argparse, col = c("transparent", "black"), + vp = viewport(y = 0.65, width=0.75, height = 0.21)) + plot(hashbang, col = c("transparent", "black"), + vp = viewport(y = 0.33, width = 0.5, height = 0.4)) + grid.draw(hex$mat(mat_width = 0.03, gp = gpar(col = NA, fill = "black"))) +} + +w <- 3.0 +svg("man/figures/logo.svg", width = w, height = w, bg = "transparent") +draw_logo() +dev.off() + +png("man/figures/logo.png", width = w, height = w, units = "in", + res = 72, bg = "transparent") +draw_logo() +dev.off()