I'm a software engineer at Fred Hutch in the Fred Hutch Data Science Lab
- website
- blog
- mastodon - @[email protected]
- blueskey - sckott
- 🐝 Fun fact: ~90% of bee species are solitary (not social)
cowsay w/ more animals, in R
Home Page: https://sckott.github.io/cowsay/
License: Other
I'm a software engineer at Fred Hutch in the Fred Hutch Data Science Lab
See tweets from Vince buffalo and company...
add to https://github.com/sckott/cowsay/blob/master/CONTRIBUTING.md and perhaps README as well to make sure people see it
cc @aedobbyn
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).
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)
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
Hey @noamross @richfitz @trinker @leeper
We're having problems with this pkg on windows. E.g.,
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?
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.
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...
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)
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.
_____
.'` ,-. `'.
/ ([ ]D \
/.-""`(`)`""-.\
<'```(.)```'>
<'```(.)```'>
<'``(.)``'>
sk <``\_/``>
`'---'`
via #86
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?
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 :-)
\ ^__^
\ (oo)\ ________
(__)\ )\ /\
||------w|
|| ||
--Ethan
move right foot over
https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/cowsay-00check.html
https://www.r-project.org/nosvn/R.check/r-release-linux-x86_64/cowsay-00check.html
@aedobbyn getting warnings on cran checks - during vignette build its saying multicolor is not available. doesn't really make sense since its in suggests here, and all binaries seem to be avail. for multicolor on cran.
probably wait a few days and see if those warnings go away
@aedobbyn do you think you can get it back on cran?
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
Line 135 in 1a1a590
could also check whether the two color arguments are NULL?
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.
https://ci.appveyor.com/project/sckott/cowsay/build/1.0.218#L366
not sure if this is just appveyor or a problem here
not like yoda it sounds at all.
See http://endless.horse (who knew there was a .horse
tld?)
Trick is working out how to simulate endless scrolling without being deeply annoying.
This has great prank potential in portable form :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.