Giter Site home page Giter Site logo

cowsay's Introduction

cowsay

cran checks R-check codecov rstudio mirror downloads cran version

What is this?

If you are familiar with cowsay on the cli, then you know what this is, but for R. If not, read below. Why? Why not?

Contributors (alphabetical)

  • Amanda Dobbyn
  • Andreas Brandmaier
  • Andy Teucher
  • Carson Sievert
  • Franz-Sebastian Krah
  • Guangchuang Yu
  • Karl Broman
  • Kiyoko Gotanda
  • Lucy D’Agostino McGowan
  • Marion Louveaux
  • Noam Ross
  • Paolo Sonego
  • Philipp Boersch-Supan
  • Rich FitzJohn
  • Scott Chamberlain
  • Thomas Leeper
  • Tyler Rinker

That’s right, it takes 17 people to make cowsay - it’s that hard.

Contributing

See CONTRIBUTING.md

Where to find ASCII animal art

Sources to look in:

Permissions

In the ascii art mailing list https://groups.google.com/forum/#!forum/alt.ascii-art they say:

 As for posting other people's ASCII art,
    after a discussion in news:alt.ascii-art       _     ___
    the following rules were agreed upon:         #_~`--'__ `===-,
    1.  If an ASCII ART picture has initials      `.`.     `#.,//
        on it, leave them on when posting it      ,_\_\     ## #\
    2.  If an ASCII ART picture doesn't have      `__.__    `####\
        initials on it,  mention  that  you            ~~\ ,###'~
        didn't  draw  it  when  posting  it.              \##'
    3.  If somebody  posts a picture without                  [nosig]
        initials and you have an original copy
        with initials on, feel free to re-post the original version.
        *   The re-post ought not to be taken personally, as we all
            know that ASCII art often loses proper credits.
            Responses to the re-post are not necessary.

    One contributor, name of Krogg, suggested the following:

    1.) Ultra polite:...ya make yer own ascii and use it.
    2.)  Very polite:...Ya contact the author and ask if ya
                        can use it...
    3.)       polite:...Ya use it but you keep the Credits
                        in there like they should be.
    4.)         rude:...Ya use it and strip credits.
    5.)    Very rude:...Ya use it and claim that it Is
                        _Your_ very own creation...

So, let’s go with this rule: Let’s include found (on the web) ascii art in this pkg, include signature if there, and if no signature, put in a [nosig] (see above).

Quick watch start

Asciicast: https://asciinema.org/a/7745

Install

From CRAN

install.packages("cowsay")

Dev version

remotes::install_github("sckott/cowsay")

library("cowsay")

The animals

sort(names(animals))
#>  [1] "alligator"    "ant"          "anxiouscat"   "bat"          "bat2"        
#>  [6] "behindcat"    "bigcat"       "buffalo"      "cat"          "chicken"     
#> [11] "chuck"        "clippy"       "cow"          "daemon"       "duck"        
#> [16] "duckling"     "egret"        "endlesshorse" "facecat"      "fish"        
#> [21] "frog"         "ghost"        "goldfish"     "grumpycat"    "hypnotoad"   
#> [26] "longcat"      "longtailcat"  "monkey"       "mushroom"     "owl"         
#> [31] "pig"          "poop"         "pumpkin"      "rabbit"       "shark"       
#> [36] "shortcat"     "signbunny"    "smallcat"     "snowman"      "spider"      
#> [41] "squirrel"     "squirrel2"    "stegosaurus"  "stretchycat"  "trilobite"   
#> [46] "turkey"       "whale"        "wolf"         "yoda"

Say Something

say('time')
#> 
#>  -------------- 
#> 2023-11-02 07:16:42.618198 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("ain't that some shit", "chicken")
#> 
#>  ----- 
#> ain't that some shit 
#>  ------ 
#>     \   
#>      \
#>          _
#>        _/ }
#>       `>' \
#>       `|   \
#>        |   /'-.     .-.
#>         \'     ';`--' .'
#>          \'.    `'-./
#>           '.`-..-;`
#>             `;-..'
#>             _| _|
#>             /` /` [nosig]
#> 

Add some color:

library(crayon)

say("boo!", "ghost", 
    what_color = "cyan", by_color = "saddlebrown")

ghost

say("I love hooo you are!", "owl", 
    what_color = rgb(0, 1, 1), by_color = "#FF0000")

owl

String styles together crayon-style:

say(what = "rms", by = "rms", 
        what_color = yellow$bgMagenta$bold,
        by_color = cyan$italic)

rms

This doesn’t preclude you from adding extra crayon colors to your what string directly.

say(what = paste0("hello ", crayon::yellow("there "), crayon::underline("world")), 
    by = "trilobite", 
    what_color = bgBlue$cyan$italic,
    by_color = "thistle")  # Don't ask me why "thistle" is pink/purple

trilobite

Vary type of output, default calls message()

say("hell no!")
#> 
#>  -------------- 
#> hell no! 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("hell no!", type="warning")
#> Warning in say("hell no!", type = "warning"): 
#>  -------------- 
#> hell no! 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say("hell no!", type="string")
#> [1] "\n -------------- \nhell no! \n --------------\n    \\\n      \\\n        \\\n            |\\___/|\n          ==) ^Y^ (==\n            \\  ^  /\n             )=*=(\n            /     \\\n            |     |\n           /| | | |\\\n           \\| | |_|/\\\n      jgs  //_// ___/\n               \\_)\n  "

Catfacts!!!!

From the catfacts API at https://catfact.ninja

say("catfact", "cat")
#> --------------
#> When a domestic cat goes after mice, about 1 pounce in 3 results in a catch.
#> --------------
#>    \
#>      \
#>        \
#>            |\___/|
#>          ==) ^Y^ (==
#>            \  ^  /
#>             )=*=(
#>            /     \
#>            |     |
#>           /| | | |\
#>           \| | |_|/\
#>      jgs  //_// ___/
#>               \_)

Long cat

From the a Boing Boing tweet on 2014-05-10 “twitter.com/BoingBoing/status/465170473194512384” (post may be gone)

say("it's caturday", "longcat")
#> 
#>  ----- 
#> it's caturday 
#>  ------ 
#>     \   
#>      \
#>     .ハ,,ハ
#>     ( ゚ω゚)
#>     |つ  つ
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     |    |
#>     U "  U
#>         [BoingBoing]
#> 

Grumpy cat

say('NO!', by='grumpycat')
#> 
#>  -------------- 
#> NO! 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

say('WOKE UP TODAY, IT WAS TERRIBLE', by='grumpycat')
#> 
#>  -------------- 
#> WOKE UP TODAY, IT WAS TERRIBLE 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

say('I HAD FUN ONCE, IT WAS AWFUL', by='grumpycat')
#> 
#>  -------------- 
#> I HAD FUN ONCE, IT WAS AWFUL 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

Bunny Holding a sign

say(by='signbunny')
#> 
#>  -------------- 
#> Hello world! 
#>  --------------
#> (\__/) ||
#> (•ㅅ•) ||
#> /   づ
#>           [nosig]
#> 

Fish

say(by='fish')
#> 
#>  ----- 
#> Hello world! 
#>  ------ 
#>     \   
#>      \
#>   ><((((º>  ><((((º>  ><((((º>  ><((((º>  ><((((º>
#>       Kiyoko Gotanda
#> 

R fortunes

say('fortune','cat')
#> 
#>  -------------- 
#> 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 Statistical Computing'
#>  Opening lecture RSS 2002, Plymouth
#>  September 2002 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

You can also pick a particular fortune by number or regex search - if the fortune parameter is not NULL you don’t have pass anything to the what parameter (the 1st parameter)

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 recommendation about nonlinear least squares computer programs from 'Box-Jenkins, 1976'
#>  R-help
#>  January 2005 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say(fortune='whatever')
#> 
#>  -------------- 
#> Justin: Is there a function that just does whatever I'm thinking (aka whatever my homework question is...)?
#> Joshua Ulrich: That's the magic_pony function.
#>  Justin and Joshua Ulrich
#>  stackoverflow.com
#>  June 2013 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

Trilobite

say("Hi there :)", by='trilobite')
#> 
#>  -------------- 
#> Hi there :) 
#>  --------------
#>     \
#>       \
#>         \
#>           _____
#>        .'` ,-. `'.
#>       /   ([ ])   \
#>      /.-""`(`)`""-.\
#>       <'```(.)```'>
#>       <'```(.)```'>
#>        <'``(.)``'>
#>    sk   <``\_/``>
#>          `'---'`
#> 

Shark

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 
#>  --------------
#>     \
#>       \
#>         \
#>               /""-._
#>               .       '-,
#>                :          '',
#>                 ;      *     '.
#>                  ' *         () '.
#>                    \               \
#>                     \      _.---.._ '.
#>                     :  .' _.--''-''  \ ,'
#>         .._           '/.'             . ;
#>         ; `-.          ,                \'
#>          ;   `,         ;              ._\
#>           ;    \     _,-'                ''--._
#>           :    \_,-'                          '-._
#>           \ ,-'                       .          '-._
#>           .'         __.-'';            \...,__       '.
#>         .'      _,-'        \              \   ''--.,__  '\
#>         /    _,--' ;         \              ;           \^.}
#>         ;_,-' )     \  )\      )            ;
#>              /       \/  \_.,-'             ;
#>             /                              ;
#>          ,-'  _,-'''-.    ,-.,            ;      PFA
#>       ,-' _.-'        \  /    |/'-._...--'
#>      :--``             )/
#>   '
#> 

Buffalo

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 
#>  --------------
#>     \
#>       \
#>         \
#>                    _.-````'-,_
#>          _,.,_ ,-'`           `'-.,_
#>        /)     (                   '``-.
#>       ((      ) )                      `\
#>         \)    (_/                        )\
#>         |       /)           '    ,'    / \
#>         `\    ^'            '     (    /  ))
#>           |      _/\ ,     /    ,,`\   (  "`
#>           \Y,   |   \  \  | ````| / \_ \
#>             `)_/      \  \  )    ( >  ( >
#>                        \( \(     |/   |/
#>           mic & dwb  /_(/_(    /_(  /_(
#> 

Clippy

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 Statistical Computing'
#>  Opening lecture RSS 2002, Plymouth
#>  September 2002 
#>  ------ 
#>     \   
#>      \   __
#>    / \
#>    | |
#>    @ @
#>   || ||
#>   || ||
#>   |\_/|
#>   \___/ GB

Yoda

say("fortune", by = "yoda")

Bats!

say("hi, i'm a bat", by="bat")
#> 
#>  ------------- 
#> hi, i'm a bat 
#>  -------------- 
#>               \   
#>                \  
#>                 \
#>         __.--'\     \.__./     /'--.__
#>     _.-'       '.__.'    '.__.'       '-._
#>   .'                                      '.
#>  /                                          \
#> |                                            |
#> |                                            |
#>  \         .---.              .---.         /
#>   '._    .'     '.''.    .''.'     '.    _.'
#>      '-./            \  /           \.-'
#>                       ''mrf

See also bat2

Monkey!

say("fortune", by = "monkey")
#> 
#>  ------------- 
#> Corinna Schmitt: How can I divide the number 0.285 with 2. I need a function.
#>   Result: 0.285 / 2 = 0.1425
#> Gabor Csardi: Well, i think
#>   half.of.0.285 <- function() {
#>     0.1425
#>   }
#> would do the trick.
#>  Corinna Schmitt and Gabor Csardi
#>  R-help
#>  April 2007 
#>  -------------- 
#>               \   
#>                \  
#>                 \
#> 
#>                   .="=.
#>                 _/.-.-.\_     _
#>                ( ( o o ) )    ))
#>                 |/  "  \|    //
#>                  \'---'/    //
#>            jgs   /`"""`\\  ((
#>                 / /_,_\ \\  \\
#>                 \_\_'__/  \  ))
#>                 /`  /`~\   |//
#>                /   /    \  /
#>           ,--`,--'\/\    /
#>           '-- "--'  '--'

Daemon!

say("fortune", by = "daemon")
#> 
#>  ----- 
#> Tony Plate: There looks to be a typo in the R-exts manual: [...]
#> Peter Dalgaard: 'svn blame' tells me that this was Brian's addition in rev.35362 [...]
#> Brian D. Ripley: I prefer 'svn praise' myself.
#> Peter Dalgaard: Or 'svn annotate'. I think it depends on what I'm looking for, plus the risk that the author (perpetrator, contributor) might be me...
#>  Tony Plate, Peter Dalgaard, and Brian D. Ripley
#>  about a typo in the documentation
#>  R-devel
#>  April 2007 
#>  ------ 
#>     \   
#>      \  
#>       \
#>             ,        ,
#>            /(        )`
#>            \ \___   / |
#>             /- _  `-/  '
#>            (/\/ \ \   /\
#>            / /   | `    
#>            O O   ) /    |
#>            `-^--'`<     '
#>           (_.)  _  )   /
#>            `.___/`    /
#>              `-----' /
#> <----.     __ / __   \
#> <----|====O)))==) \) /====
#> <----'    `--' `.__,' \
#>              |        |
#>               \       /
#>         ______( (_  / \______
#>       ,'  ,-----'   |        \
#>       `--{__________)        \/ [nosig]

Egret

say("je ne regrette rien", by = "egret")
#> 
#>  ----- 
#> je ne regrette rien 
#>  ------ 
#>     \   
#>      \  
#>       \
#>        \   _,
#>       -==<' `
#>           ) /
#>          / (_.
#>         |  ,-,`\
#>          \\   \ \
#>           `\,  \ \
#>            ||\  \`|,
#>  jgs      _|| `=`-'
#>          ~~`~`

See also bat2

Endless horse

endless_horse()
## -----
## Hello world!
## ------
##    \
##     \
##      \
##       ,
##    _,,)\.~,,._
##     (()`  ``)\))),,_
##      |     \ ''((\)))),,_          ____
##      |6`   |   ''((\())) "-.____.-"    `-.-,
##      |    .'\    ''))))'                  \)))
##      |   |   `.     ''                     ((((
##      \, _)     \/                          |))))
##       `'        |                          (((((
##                 \                  |       ))))))
##                  `|    |           ,\     /((((((
##                   |   / `-.______.<  \   |  )))))
##                   |   |  /         `. \  \  ((((
##                   |  / \ |           `.\  | (((
##                   \  | | |             )| |  ))
##                    | | | |             || |  '   [endless.horse]
##                    | | | |             || |
##
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |
##                    | | | |             || |

Using pipes

library("magrittr")
"I HAD FUN ONCE, IT WAS AWFUL" %>% say('grumpycat')
#> 
#>  -------------- 
#> I HAD FUN ONCE, IT WAS AWFUL 
#>  --------------
#>     \
#>       \
#>         \
#>       ハ _ ハ
#>       ಠ X ಠ
#> 

I just want the animals!

Okay, hold your endless horses. Just use the exported vector animals, and you can select the animal you want by name.

animals['clippy']
#>                                                                                                                    clippy 
#> "\n\n ----- \n%s \n ------ \n    \\   \n     \\   __\n   / \\\n   | |\n   @ @\n  || ||\n  || ||\n  |\\_/|\n  \\___/ GB\n"

Meta

  • License: MIT
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

cowsay's People

Contributors

aedobbyn avatar ateucher avatar bgreenwell avatar brandmaier avatar brandongreenwell-8451 avatar cpsievert avatar davharris avatar florianm avatar guangchuangyu avatar jeremycg avatar kbroman avatar leeper avatar lucymcgowan avatar marionlouveaux avatar mnr avatar noamross avatar onertipaday avatar pboesu avatar richfitz avatar sckott avatar trinker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cowsay's Issues

Simplifying color argument

Hey Scott,

Just wondering, would it be possible to add functionality to say() that would allow for a single color argument? Having separate arguments for what_color and by_color is necessary. Most of the time, though, I specify these to be the same color. It would be nice to specify color = "blue", for example, and have that be equivalent to what_color = "blue", by_color = "blue".

Love the package by the way. Makes my coding work flow a little more fun :-)


thanks!

\   ^__^ 
 \  (oo)\ ________ 
    (__)\         )\ /\ 
         ||------w|
         ||      ||

--Ethan

Fix file request from CRAN

You have file 'cowsay/man/cowsay.Rd' with \docType{package}, likely
intended as a package overview help file, but without the appropriate
PKGNAME-package \alias as per "Documenting packages" in R-exts.

This seems to be the consequence of the breaking change

Using @doctype package no longer automatically adds a -package alias.
Instead document _PACKAGE to get all the defaults for package
documentation.

in roxygen2 7.0.0 (2019-11-12) having gone unnoticed, see
r-lib/roxygen2#1491.

As explained in the issue, to get the desired PKGNAME-package \alias
back, you should either change to the new approach and document the new
special sentinel

"_PACKAGE"

or manually add

@Aliases cowsay-package

if remaining with the old approach.

Please fix in your master sources as appropriate, and submit a fixed
version of your package within the next few months.

Remove speech bubble from ascii

It seems like the default way of specifying animals forces speech bubbles within the elements of the animals object, causing the output to be less pretty compared to the command line alternative.

< hello >
 -------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

vs

 ----- 
hello 
 ------ 
    \   ^__^ 
     \  (oo)\ ________ 
        (__)\         )\ /\ 
             ||------w|
             ||      ||

This can be solved by giving the responsibility of creating the speech bubble to say function. Would this be a welcome change? I can look into it if I find some spare time.

Prints everything to stderr instead of stdout

This example prints nothing if run in bash:

Rscript - 2>/dev/null <<!
library(cowsay)
say("Hello, Kitty!", "stretchycat")
!

It means that even the kitty is going to stderr, which is IMO unexpected.

I found this after trying to silence an annoying "error" message that seems
to be printed unconditionally if the crayon package isn't run on a color terminal.

Colors cannot be applied in this environment :( Try using a terminal or RStudio.

I would humbly request to not treat animals as if they were errors, which is surely not in the spirit of this package, and to respect people who pefer uncolored pets on their text terminals by default (don't print the message, just don't output colors in this case).

retrojunkie.com is offline

The www.retrojunkie.com site, linked from the README under "Where to find ASCII animal art", is offline. The hostname isn't even resolving, so it looks like it may be gone for good. Should the link be removed from the README?

$ ping retrojunkie.com
ping: cannot resolve retrojunkie.com: Unknown host
$ ping www.retrojunkie.com
ping: cannot resolve www.retrojunkie.com: Unknown host

No message when colors are NULL?

I am using cowsay in an R Markdown document and I get a message about colors despite my not using them e.g. (reprex uses knitr so you'll see the problem)

cowsay::say("rms", "rms")
#> Colors cannot be applied in this environment :( Try using a terminal or RStudio.
#> 
#> 
#>  ----- 
#> Richard Stallman won a Sudoku that started with only one number in each line. 
#>  ------ 
#>     \   
#>      \
#>                     @@@@@@ @
#>                   @@@@     @@
#>                  @@@@ =   =  @@ 
#>                 @@@ @ _   _   @@ 
#>                  @@@ @(0)|(0)  @@ 
#>                 @@@@   ~ | ~   @@
#>                 @@@ @  (o1o)    @@
#>                @@@    #######    @
#>                @@@   ##{+++}##   @@
#>               @@@@@ ## ##### ## @@@@
#>               @@@@@#############@@@@
#>              @@@@@@@###########@@@@@@
#>             @@@@@@@#############@@@@@
#>             @@@@@@@### ## ### ###@@@@
#>              @ @  @              @  @
#>                @                    @

Created on 2018-10-05 by the reprex package (v0.2.1)

Maybe

cowsay/R/say.r

Line 135 in 1a1a590

if (crayon::has_color() == FALSE) {

could also check whether the two color arguments are NULL?

Weird RJSONIO-jsonlite error upon import

When I import cowsay into my package, then install it (via devtools::install), I get the following error:

Note: the specification for S3 class “AsIs” in package ‘RJSONIO’ seems equivalent to one from package ‘jsonlite’: not turning on duplicate class definitions for this class.

Any idea that what's about?

Standardize the spacing above animals' speech bubbles?

Spacing above the text differs depending on the animal, e.g. cat vs. chicken.

I think the cat spacing is preferable because there's a smaller gap, but fine as long as they're standard imo. (Removing the "Colors cannot be applied in this environment :( Try using a terminal or RStudio." line in the reprex below for simplicity.)

library(cowsay)

say(by = "cat")
#> 
#>  -------------- 
#> Hello world! 
#>  --------------
#>     \
#>       \
#>         \
#>             |\___/|
#>           ==) ^Y^ (==
#>             \  ^  /
#>              )=*=(
#>             /     \
#>             |     |
#>            /| | | |\
#>            \| | |_|/\
#>       jgs  //_// ___/
#>                \_)
#> 

say(by = "chicken")
#> 
#> 
#>  ----- 
#> Hello world! 
#>  ------ 
#>     \   
#>      \
#>          _
#>        _/ }
#>       `>' \
#>       `|   \
#>        |   /'-.     .-.
#>         \'     ';`--' .'
#>          \'.    `'-./
#>           '.`-..-;`
#>             `;-..'
#>             _| _|
#>             /` /` [nosig]
#> 

Created on 2019-01-23 by the reprex package (v0.2.1)

encoding on windows

Hey @noamross @richfitz @trinker @leeper

We're having problems with this pkg on windows. E.g.,

screen shot 2014-09-18 at 8 58 48 am

But on unix does

say("asdfsf", "longcat", length = 4)

 ----- 
 asdfsf 
 ------ 
    \   
     \
    .ハ,,ハ
    ( ゚ω゚)
    |つ  つ
    |    |
    |    |
    |    |
    |    |
    U " U

This is what longcat is in the pkg:

  longcat <-
    '
\n ----- \n %s \n ------ \n    \\\   \n     \\\
    .\uFF8A,,\uFF8A
    ( \uFF9F\u03C9\uFF9F)
    |\u3064  \u3064
%s
    U " U
    '

Any way to fix this to work on windows?

'catfact' error

I'm getting an error trying to get a 'catfact'

say("catfact")
Error in open.connection(con, "rb") : HTTP error 503.

say(what = "catfact")
Error in open.connection(con, "rb") : HTTP error 503.

say(what = "catfact", by = "cat")
Error in open.connection(con, "rb") : HTTP error 503.

cowsay::say(what = "catfact", by = "cat")
Error in open.connection(con, "rb") : HTTP error 503.

Coming from this line

jsonlite::fromJSON("http://catfacts-api.appspot.com/api/facts?number=1")$facts

And going to that url shows the error

Python 2.5 is no longer available. Please refer to https://goo.gl/aESk5L for more information.


Session info ---------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.4 (2018-03-15)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.1.414)           
 language (EN)                        
 collate  en_AU.UTF-8                 
 tz       Australia/Melbourne         
 date     2018-04-06                  

Packages -------------------------------------------------------------------------------------------------------------------
 package    * version    date       source                          
 base       * 3.4.4      2018-03-15 local                           
 compiler     3.4.4      2018-03-15 local                           
 cowsay     * 0.5.0      2016-12-16 CRAN (R 3.4.0)                  
 curl         3.0        2017-10-06 CRAN (R 3.4.2)                  
 datasets   * 3.4.4      2018-03-15 local                           
 devtools     1.13.4     2017-11-09 CRAN (R 3.4.2)                  
 digest       0.6.15     2018-01-28 cran (@0.6.15)                  
 fortunes     1.5-4      2016-12-29 CRAN (R 3.4.0)                  
 graphics   * 3.4.4      2018-03-15 local                           
 grDevices  * 3.4.4      2018-03-15 local                           
 jsonlite     1.5        2017-06-01 cran (@1.5)                     
 memoise      1.1.0      2018-01-08 Github (hadley/memoise@611cfad) 
 methods    * 3.4.4      2018-03-15 local                           
 rmsfact      0.0.3      2016-08-04 CRAN (R 3.4.0)                  
 rstudioapi   0.7        2017-09-07 cran (@0.7)                     
 stats      * 3.4.4      2018-03-15 local                           
 tools        3.4.4      2018-03-15 local                           
 utils      * 3.4.4      2018-03-15 local                           
 withr        2.1.1.9000 2018-03-13 Github (jimhester/withr@5d05571)
 yaml         2.1.16     2017-12-12 cran (@2.1.16)

why is animals object not exported?

subject says it all.

I would love to just be able to import animals with ::, as opposed to ::: (which has build checks yell at me).

An easy way to allow people (like my lazy self) to get cowsay animals without having to use ::: would be something like

#' @export
getAnimal <- function(animalName) {
    return(animals[animalName])
}

Just an idea, though...

Distinct project name, like "Rcowsay"?

Any chance of renaming this project and repo to "rcowsay" or something similar, to distinguish it from the original command line (Perl) cowsay and implementations in other languages, like the Java-based ricksbrown/cowsay? It would make discussing them a bit easier, and would make contributing to multiple cowsay projects easier with GitHub forks. Right now if I fork both projects, one of them ends up as "apjanke/cowsay-1", which isn't very descriptive.

buffalo

See tweets from Vince buffalo and company...

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.