Giter Site home page Giter Site logo

francojra / certificate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forwards/certificate

0.0 0.0 0.0 2.04 MB

R package for generating workshop attendance certificates

Home Page: https://forwards.github.io/certificate/

License: Other

R 76.69% TeX 13.53% Batchfile 9.78%

certificate's Introduction

certificate

R-CMD-check Codecov test coverage

The certificate package is designed to help generate certificates for R courses.

Installation

This package is not on CRAN. You can install the package from GitHub with:

# install.packages("devtools")
devtools::install_github("forwards/certificate")

Example

First load the package

library(certificate)

Certificates can be generate for multiple participants at once. Here we specify a couple of fake names for illustration (generated with charlatan::ch_name):

attendees <- c("Marnie Dickinson", "Dr. Marlin Wilderman")

Then we specify the basic metadata of the workshop, which will be the same for all certificates

workshop <- "Package development workshop"
date <- as.Date("2018-01-01")
location <- "University of Lorraine"

The curriculum is a summary of the workshop contents. This should be specified in markdown format and it is easier to write this in a separate markdown file. An example is included in the certificate package.

curriculum <- system.file("rmarkdown", "templates",
                          "workshop_certificate", "resources",
                          "default_workshop_contents.md", 
                          package = "certificate")
readLines(curriculum)
#> [1] "- Making code into an R package"    ""                                  
#> [3] "- Collaborative coding with GitHub" ""                                  
#> [5] "- Writing a vignette or an article" ""                                  
#> [7] "- Building a package webpage"       ""                                  
#> [9] "- Submitting a package to CRAN"

The last set of required information is about the certifying person and the certifying organization

certifier <- "Zaire Crooks"
credentials <- "Forwards teaching team member"
organization <- "Forwards, the R Foundation taskforce for women and other
under-represented groups"
organization_url <- "forwards.github.io/"

Now we can generate the certificates in a new directory, e.g.

dir <- "~/Desktop/certificates"
create_workshop_certificates(attendees, workshop, date, location,
                             curriculum, certifier, credentials,
                             organization, organization_url,
                             dir)
#> 
#> 
#> processing file: skeleton.Rmd
#>   |                                                           |                                                   |   0%  |                                                           |...                                                |   6%                     |                                                           |......                                             |  12% [setup]             |                                                           |.........                                          |  18%                     |                                                           |............                                       |  24% [attendee]          |                                                           |...............                                    |  29%                     |                                                           |..................                                 |  35% [action_text]       |                                                           |.....................                              |  41%                     |                                                           |........................                           |  47% [workshop]          |                                                           |...........................                        |  53%                     |                                                           |..............................                     |  59% [location]          |                                                           |.................................                  |  65%                     |                                                           |....................................               |  71% [curriculum_title]  |                                                           |.......................................            |  76%                     |                                                           |..........................................         |  82% [curriculum]        |                                                           |.............................................      |  88%                     |                                                           |................................................   |  94% [signature]         |                                                           |...................................................| 100%                   
#> output file: skeleton.knit.md
#> /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS skeleton.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output /Users/stspao/Desktop/certificates/package_development_workshop_2018-01-01_marnie_dickinson.tex --lua-filter /Users/stspao/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/stspao/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --template template.tex --highlight-style tango --pdf-engine xelatex
#> 
#> Output created: /Users/stspao/Desktop/certificates/package_development_workshop_2018-01-01_marnie_dickinson.pdf
#> 
#> 
#> processing file: skeleton.Rmd
#>   |                                                           |                                                   |   0%  |                                                           |...                                                |   6%                     |                                                           |......                                             |  12% [setup]             |                                                           |.........                                          |  18%                     |                                                           |............                                       |  24% [attendee]          |                                                           |...............                                    |  29%                     |                                                           |..................                                 |  35% [action_text]       |                                                           |.....................                              |  41%                     |                                                           |........................                           |  47% [workshop]          |                                                           |...........................                        |  53%                     |                                                           |..............................                     |  59% [location]          |                                                           |.................................                  |  65%                     |                                                           |....................................               |  71% [curriculum_title]  |                                                           |.......................................            |  76%                     |                                                           |..........................................         |  82% [curriculum]        |                                                           |.............................................      |  88%                     |                                                           |................................................   |  94% [signature]         |                                                           |...................................................| 100%                   
#> output file: skeleton.knit.md
#> /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS skeleton.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output /Users/stspao/Desktop/certificates/package_development_workshop_2018-01-01_dr.marlin_wilderman.tex --lua-filter /Users/stspao/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/stspao/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --template template.tex --highlight-style tango --pdf-engine xelatex
#> 
#> Output created: /Users/stspao/Desktop/certificates/package_development_workshop_2018-01-01_dr.marlin_wilderman.pdf

See ?create_workshop_certificate for more detail on the arguments of this function, which allow customization of the wording, logo and colours, as well as the option to supply an image of a signature to place on the signature line.

certificate's People

Contributors

hturner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.