Skip to content

Commit

Permalink
Support githubuser argument in kitten() call
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Feb 8, 2025
1 parent eea3c1f commit 2706698
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2025-02-08 Dirk Eddelbuettel <[email protected]>

* inst/examples/kitten.r: Support githubuser argument kitten() call

2025-02-05 Dirk Eddelbuettel <[email protected]>

* inst/examples/rcc.r (rccwrapper): Print rcmdcheck result
Expand Down
10 changes: 6 additions & 4 deletions inst/examples/kitten.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ library(docopt)
doc <- "Usage: kitten.r [-t TYPE] [-b] [-p] [-h] [-x] PACKAGE
-t --type TYPE type of kitten: plain, rcpp, arma, eigen. [default: plain]
-b --bunny install roxygen2 documentation example and roxygenize (only for plain)
-p --puppy invoke tinytest::puppy to set up testing (only for plain)
-b --bunny install roxygen2 documentation example and roxygenize (only for plain)
-p --puppy invoke tinytest::puppy to set up testing (only for plain)
-h --help show this help text
-x --usage show help and short example usage"

Expand All @@ -26,10 +26,12 @@ See http://dirk.eddelbuettel.com/code/littler.html for more information.\n")
haswhoami <- requireNamespace("whoami", quietly=TRUE)
author <- if (haswhoami) whoami::fullname("Your Name") else "Your Name"
email <- if (haswhoami) whoami::email_address("[email protected]") else "[email protected]"
githubuser <- if (haswhoami) whoami::gh_username() else NA_character_

## maybe support path, author, maintainer, email, license, ...
## maybe support path, author, maintainer, email, license, ... command-line options
ign <- switch(opt$type,
plain = pkgKitten::kitten(opt$PACKAGE, author=author, email=email,
plain = pkgKitten::kitten(opt$PACKAGE,
author=author, email=email, githubuser=githubuser,
puppy=opt$puppy, bunny=opt$bunny),
rcpp = Rcpp::Rcpp.package.skeleton(opt$PACKAGE, author=author, email=email),
arma = RcppArmadillo::RcppArmadillo.package.skeleton(opt$PACKAGE),
Expand Down

0 comments on commit 2706698

Please sign in to comment.