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 0000000..9d5b767 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/man/figures/logo.svg b/man/figures/logo.svg new file mode 100644 index 0000000..f64da43 --- /dev/null +++ b/man/figures/logo.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --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()