-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
90 lines (65 loc) · 2.88 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
output:
md_document:
variant: markdown_github
---
```{r setup, echo = FALSE}
knitr::opts_chunk$set(
cache = FALSE,
collapse = TRUE,
message = FALSE,
# warning = FALSE,
comment = "#>",
fig.align = "left",
fig.path = "tools/README-"
)
```
# roundhouse: An R wrapper to the ICNDb API <img src="tools/roundhouse-logo.png" align="right" width="130" height="150" />
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/roundhouse)](https://CRAN.R-project.org/package=roundhouse)
[![Travis-CI Build Status](https://travis-ci.org/bgreenwell/roundhouse.svg?branch=master)](https://travis-ci.org/bgreenwell/roundhouse)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/bgreenwell/roundhouse?branch=master&svg=true)](https://ci.appveyor.com/project/bgreenwell/roundhouse)
[![Coverage Status](https://img.shields.io/codecov/c/github/bgreenwell/roundhouse/master.svg)](https://codecov.io/github/bgreenwell/roundhouse?branch=master)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
<!-- badges: end -->
## Overview
Generate random Chuck Norris facts from the excellent internet Chuck Norris database `r emo::ji("sunglasses")`.
## Sample fact
Chuck Norris solved the [traveling salesman problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem) in $O\left(1\right)$ time. Here’s the pseudo-code:
```
Break salesman into N pieces.
Kick each piece to a different city.
```
## Installation
You can install the development version of `roundhouse` from GitHub using
```{r install, eval=FALSE}
if (!requireNamespace("devtools")) {
install.packages("devtools")
}
devtools::install_github("bgreenwell/roundhouse")
```
## Example usage
`r emo::ji("warning")` **WARNING:** Some facts may contain explicit material!
```{r example-01, eval = FALSE}
# Generate a random fact
roundhouse::random_fact()
#> [1] "Chuck Norris has never been accused of murder because his roundhouse kicks are recognized as 'acts of God.'"
# Generate multiple random facts
roundhouse::random_fact(3)
#> [1] "Chuck Norris doesn't need garbage collection because he doesn't call .Dispose(), he calls .DropKick()."
#> [2] "There are no steroids in baseball. Just players Chuck Norris has breathed on."
#> [3] "All browsers support the hex definitions #chuck and #norris for the colors black and blue."
# Print fact categories
roundhouse::fetch_categories()
#> [1] "explicit" "nerdy"
# Generate a random fact with a roundhouse kick!
roundhouse::kick(width = 40, size = 15)
```
![](tools/roundhouse.gif)
```{r example-02}
# Or simply supply your own text!
roundhouse::kick("Chuck Norris can’t test for equality because he has no equal.",
type = 2, width = 40, size = 25, fps = 5)
```
## Inspirations
* [Lone Wolf McQuade](https://www.youtube.com/watch?v=pfLTbzU0FXo)