Skip to content

Commit

Permalink
fix #98 use underscores for top of the bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Dec 9, 2024
1 parent 77b0bf9 commit d576476
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 47 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
cowsay (development version)
============

### MINOR IMPROVEMENTS

* change top of bubble to underscores from hyphens (#98)

cowsay 1.0.0
============

Expand Down
6 changes: 4 additions & 2 deletions R/bubble.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#' text_style <- crayon::make_style(text_color)
#' text_style(bubble_say(quote))
bubble_say <- function(x, width = 60) {
top <- bottom <- "-"
top <- "_"
bottom <- "-"
side <- "|"
empty_to_avoid_rlang_header <- ""
added_ws <- 2L
Expand Down Expand Up @@ -61,7 +62,8 @@ bubble_say <- function(x, width = 60) {
#' @export
#' @rdname bubble_say
bubble_think <- function(x, width = 60) {
top <- bottom <- "-"
top <- "_"
bottom <- "-"
left <- "("
right <- ")"
empty_to_avoid_rlang_header <- ""
Expand Down
90 changes: 45 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ sort(names(animals))
``` r
say("time")
#>
#> ----------------------------
#> < 2024-12-04 20:33:12.064934 >
#> ____________________________
#> < 2024-12-09 09:56:18.661392 >
#> ----------------------------
#> \
#> \
Expand All @@ -157,7 +157,7 @@ say("time")
``` r
say("ain't that some shit", "chicken")
#>
#> ----------------------
#> ______________________
#> < ain't that some shit >
#> ----------------------
#> \
Expand Down Expand Up @@ -249,7 +249,7 @@ say(
``` r
say("hell no!")
#>
#> ----------
#> __________
#> < hell no! >
#> ----------
#> \
Expand All @@ -267,7 +267,7 @@ say("hell no!")
``` r
say("hell no!", type = "warning")
#> Warning in say("hell no!", type = "warning"):
#> ----------
#> __________
#> < hell no! >
#> ----------
#> \
Expand All @@ -284,7 +284,7 @@ say("hell no!", type = "warning")

``` r
say("hell no!", type = "string")
#> [1] "\n ---------- \n< hell no! >\n ---------- \n \\\n \\\n\n ^__^ \n (oo)\\ ________ \n (__)\\ )\\ /\\ \n ||------w|\n || ||"
#> [1] "\n __________ \n< hell no! >\n ---------- \n \\\n \\\n\n ^__^ \n (oo)\\ ________ \n (__)\\ )\\ /\\ \n ||------w|\n || ||"
```


Expand All @@ -296,11 +296,13 @@ From the catfacts API at <https://catfact.ninja>
``` r
say("catfact", "cat")
#>
#> --------------------------------------------------------
#> / In ancient Egypt, mummies were made of cats, and \
#> | embalmed mice were placed with them in their tombs. In |
#> \ one ancient city, over 300,000 cat mummies were found. /
#> --------------------------------------------------------
#> _________________________________________________________
#> / During the time of the Spanish Inquisition, Pope \
#> | Innocent VIII condemned cats as evil and thousands of |
#> | cats were burned. Unfortunately, the widespread killing |
#> | of cats led to an explosion of the rat population, |
#> \ which exacerbated the effects of the Black Death. /
#> ---------------------------------------------------------
#> \
#> \
#>
Expand All @@ -325,7 +327,7 @@ From the a Boing Boing tweet on 2014-05-10 "twitter.com/BoingBoing/status/465170
``` r
say("it's caturday", "longcat")
#>
#> ---------------
#> _______________
#> < it's caturday >
#> ---------------
#> \
Expand Down Expand Up @@ -363,7 +365,7 @@ say("it's caturday", "longcat")
``` r
say("NO!", by = "grumpycat")
#>
#> -----
#> _____
#> < NO! >
#> -----
#> \
Expand All @@ -378,7 +380,7 @@ say("NO!", by = "grumpycat")
``` r
say("WOKE UP TODAY, IT WAS TERRIBLE", by = "grumpycat")
#>
#> --------------------------------
#> ________________________________
#> < WOKE UP TODAY, IT WAS TERRIBLE >
#> --------------------------------
#> \
Expand All @@ -393,7 +395,7 @@ say("WOKE UP TODAY, IT WAS TERRIBLE", by = "grumpycat")
``` r
say("I HAD FUN ONCE, IT WAS AWFUL", by = "grumpycat")
#>
#> ------------------------------
#> ______________________________
#> < I HAD FUN ONCE, IT WAS AWFUL >
#> ------------------------------
#> \
Expand All @@ -410,7 +412,7 @@ say("I HAD FUN ONCE, IT WAS AWFUL", by = "grumpycat")
``` r
say(by = "signbunny")
#>
#> --------------
#> ______________
#> < Hello world! >
#> --------------
#> \
Expand All @@ -429,7 +431,7 @@ say(by = "signbunny")
``` r
say(by = "fish")
#>
#> --------------
#> ______________
#> < Hello world! >
#> --------------
#> \
Expand All @@ -447,11 +449,12 @@ say(by = "fish")
library(fortunes)
say("fortune", "cat")
#>
#> ---------------------------------------------------------
#> / Maybe you should contact Microsoft, and get them to \
#> | modify their tools so they work on the R sources? |
#> | Duncan Murdoch answering the question if there is a way |
#> | compiling the R sources using VisualC++ R-help April |
#> _________________________________________________________
#> / Zhu Wang: I am trying to create a library which uses \
#> | some Fortran source files [...] Douglas Bates: Someone |
#> | named Martin Maechler will shortly be sending you email |
#> | regarding the distinction between 'library' and |
#> | 'package' :-) Zhu Wang and Douglas Bates R-help May |
#> \ 2004 /
#> ---------------------------------------------------------
#> \
Expand All @@ -476,7 +479,7 @@ You can also pick a particular fortune by number or regex search - if the `fortu
``` r
say(fortune = 100)
#>
#> ---------------------------------------------------------
#> _________________________________________________________
#> / I'm not sure I'd trust any computer recommendation from \
#> | 1976, no matter how famous the authors are. Peter |
#> | Dalgaard after Samuel Edward Kemp cited a |
Expand All @@ -497,7 +500,7 @@ say(fortune = 100)
``` r
say(fortune = "whatever")
#>
#> ---------------------------------------------------------
#> _________________________________________________________
#> / Tom Backer Johnsen: I have just started looking at R, \
#> | and are getting more and more irritated at myself for |
#> | not having done that before. However, one of the things |
Expand Down Expand Up @@ -528,7 +531,7 @@ say("Hi there :)", by = "trilobite")

````
#>
#> -------------
#> _____________
#> < Hi there :) >
#> -------------
#> \
Expand All @@ -552,7 +555,7 @@ say("Hi there :)", by = "trilobite")
``` r
say("Q: What do you call a solitary shark\nA: A lone shark", by = "shark")
#>
#> ------------------------------------------------------
#> ______________________________________________________
#> < Q: What do you call a solitary shark A: A lone shark >
#> ------------------------------------------------------
#> \
Expand Down Expand Up @@ -594,7 +597,7 @@ say("Q: What do you call a single buffalo?\nA: A buffalonely", by = "buffalo")

`````
#>
#> --------------------------------------------------------
#> ________________________________________________________
#> < Q: What do you call a single buffalo? A: A buffalonely >
#> --------------------------------------------------------
#> \
Expand All @@ -621,7 +624,7 @@ say("Q: What do you call a single buffalo?\nA: A buffalonely", by = "buffalo")
``` r
say(fortune = 59, by = "clippy")
#>
#> --------------------------------------------------------
#> ________________________________________________________
#> / Let's not kid ourselves: the most widely used piece of \
#> | software for statistics is Excel. Brian D. Ripley |
#> | 'Statistical Methods Need Software: A View of |
Expand Down Expand Up @@ -654,7 +657,7 @@ say("fortune", by = "yoda")
``` r
say("hi, i'm a bat", by = "bat")
#>
#> ---------------
#> _______________
#> < hi, i'm a bat >
#> ---------------
#> \
Expand All @@ -680,13 +683,10 @@ See also `bat2`
``` r
say("fortune", by = "monkey")
#>
#> ---------------------------------------------------------
#> / I'm not sure I'd trust any computer recommendation from \
#> | 1976, no matter how famous the authors are. Peter |
#> | Dalgaard after Samuel Edward Kemp cited a |
#> | recommendation about nonlinear least squares computer |
#> \ programs from 'Box-Jenkins, 1976' R-help January 2005 /
#> ---------------------------------------------------------
#> ___________________________________________________
#> / /* some real insanity to keep Duncan sane */ Luke \
#> \ Tierney in src/main/context.c June 2001 /
#> ---------------------------------------------------
#> \
#> \
#>
Expand All @@ -710,13 +710,13 @@ say("fortune", by = "monkey")
``` r
say("fortune", by = "daemon")
#>
#> ---------------------------------------------------------
#> / What sort of editor would overlook this clear and \
#> | demonstrable message leaping out from the data in |
#> | favour of some arcane argument about "types of sums of |
#> | squares"? Several answers come to mind: A power freak, |
#> | a SAS afficianado, an idiot. Bill Venables R-help July |
#> \ 2007 /
#> _________________________________________________________
#> / Achim Zeileis: Other visualizations of departures from \
#> | indepence include mosaicplots with shading or |
#> | association plots. See mosaicplot() and assocplot() and |
#> | the package vcd. Peter Dalgaard: I see that you've |
#> | taken initive to abbriate statiscal concepts... Achim |
#> \ Zeileis and Peter Dalgaard R-help January 2005 /
#> ---------------------------------------------------------
#> \
#> \
Expand Down Expand Up @@ -747,7 +747,7 @@ say("fortune", by = "daemon")
``` r
say("je ne regrette rien", by = "egret")
#>
#> ---------------------
#> _____________________
#> < je ne regrette rien >
#> ---------------------
#> \
Expand Down Expand Up @@ -816,7 +816,7 @@ endless_horse()
library("magrittr")
"I HAD FUN ONCE, IT WAS AWFUL" %>% say("grumpycat")
#>
#> ------------------------------
#> ______________________________
#> < I HAD FUN ONCE, IT WAS AWFUL >
#> ------------------------------
#> \
Expand Down

0 comments on commit d576476

Please sign in to comment.