GithubHelp home page GithubHelp logo

code-hex / neo-cowsay Goto Github PK

View Code? Open in Web Editor NEW
295.0 12.0 21.0 2.26 MB

๐Ÿฎ cowsay is reborn. Neo Cowsay has written in Go.

License: Artistic License 2.0

Go 98.46% Makefile 1.54%
cowsay neo-cowsay godoc go go-packages golang joke

neo-cowsay's Introduction

Neo Cowsay

Neo Cowsay is written in Go. This cowsay is extended the original cowsay. added fun more options, and you can be used as a library.

for GitHub Actions users: Code-Hex/neo-cowsay-action

Go Reference .github/workflows/main.yml Go Report Card codecov

 ______________
< I'm Neo cows >
 --------------
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

About cowsay

According to the original original manual.

cowsay is a configurable talking cow, written in Perl. It operates
much as the figlet program does, and it written in the same spirit
of silliness.

This is also supported COWPATH env. Please read more details in #33 if you want to use this.

What makes it different from the original?

  • fast
  • utf8 is supported
  • new some cowfiles is added
  • cowfiles in binary
  • random pickup cowfile option
  • provides command-line fuzzy finder to search any cows with -f - #39
  • coloring filter options
  • super mode
Movies for new options ๐Ÿฎ

Random

asciicast

Rainbow and Aurora, Bold

asciicast

And, Super Cows mode

2021-11-05.1.25.08.mov

Usage

As command

cow{say,think} version 2.0.0, (c) 2021 codehex
Usage: cowsay [-bdgpstwy] [-h] [-e eyes] [-f cowfile] [--random]
      [-l] [-n] [-T tongue] [-W wrapcolumn]
      [--bold] [--rainbow] [--aurora] [--super] [message]

Original Author: (c) 1999 Tony Monroe
Repository: https://github.com/Code-Hex/Neo-cowsay

Normal

$ cowsay Hello
 _______
< Hello >
 -------
       \   ^__^
        \  (oo)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

Borg mode

$ cowsay -b Hello
 _______
< Hello >
 -------
       \   ^__^
        \  (==)\_______
           (__)\       )\/\
               ||----w |
               ||     ||

As library

package main

import (
	"fmt"

	cowsay "github.com/Code-Hex/Neo-cowsay/v2"
)

func main() {
	say, err := cowsay.Say(
		"Hello",
		cowsay.Type("default"),
		cowsay.BallonWidth(40),
	)
	if err != nil {
		panic(err)
	}
	fmt.Println(say)
}

Examples or GoDoc

Install

Windows users via Scoop

$ scoop install neo-cowsay

Windows users via Winget

$ winget install neo-cowsay

Mac and Linux users via Homebrew

$ brew update
$ brew install Code-Hex/tap/neo-cowsay

Binary

You can download from here

library

$ go get github.com/Code-Hex/Neo-cowsay/v2

Go

cowsay

$ go install github.com/Code-Hex/Neo-cowsay/cmd/v2/cowsay@latest

cowthink

$ go install github.com/Code-Hex/Neo-cowsay/cmd/v2/cowthink@latest

License

cowsay license
==============
cowsay License
==============

cowsay is distributed under the same licensing terms as Perl: the
Artistic License or the GNU General Public License.  If you don't
want to track down these licenses and read them for yourself, use
the parts that I'd prefer:

(0) I wrote it and you didn't.

(1) Give credit where credit is due if you borrow the code for some
other purpose.

(2) If you have any bugfixes or suggestions, please notify me so
that I may incorporate them.

(3) If you try to make money off of cowsay, you suck.

===============
cowsay Legalese
===============

(0) Copyright (c) 1999 Tony Monroe.  All rights reserved.  All
lefts may or may not be reversed at my discretion.

(1) This software package can be freely redistributed or modified
under the terms described above in the "cowsay License" section
of this file.

(2) cowsay is provided "as is," with no warranties whatsoever,
expressed or implied.  If you want some implied warranty about
merchantability and/or fitness for a particular purpose, you will
not find it here, because there is no such thing here.

(3) I hate legalese.

(The Artistic License or The GNU General Public License)

Author

Neo Cowsay: codehex
Original: (c) 1999 Tony Monroe

neo-cowsay's People

Contributors

code-hex avatar dependabot[bot] avatar mattn avatar sitiom avatar sters 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  avatar

neo-cowsay's Issues

Does not have ansi escape sequence color support

Trying to load a cow that works with og perl cowsay that has an image converted to ansi escape sequences does nothing but print the raw text.

Is this the expected behavior or is color support not included yet at this point?

https://raw.githubusercontent.com/charc0al/cowsay-files/master/cows/butcher.cow

cowsay -f butcher Testing


< Testing >

Billy Butcher (The Boys)

by @roblevypixels

Generated with Charc0al's cowsay file converter http://charc0al.github.io/cowsay-files/converter

$x = "\e[49m "; #reset color
$t = "\ ";
$a = "\e[48;5;235m ";
$b = "\e[48;5;234m ";
$c = "\e[48;5;233m ";
$d = "\e[48;5;236m ";
$e = "\e[48;5;237m ";
$f = "\e[48;5;223m ";
$g = "\e[48;5;238m ";
$h = "\e[48;5;231m ";
$i = "\e[48;5;94m ";
$j = "\e[48;5;180m ";
$k = "\e[48;5;137m ";
$l = "\e[48;5;138m ";
$m = "\e[48;5;239m ";
$n = "\e[48;5;181m ";
$o = "\e[48;5;244m ";
$p = "\e[48;5;66m ";
$q = "\e[48;5;23m ";
$r = "\e[48;5;250m ";
$s = "\e[48;5;109m ";
$u = "\e[48;5;251m ";
$v = "\e[48;5;248m ";
$w = "\e[48;5;246m ";

How to use external cowfiles?

I have written my own cowfile which works fine with the old cowsay if I specify the path to it. However neo cowsay compiles cowfiles into the binary, and if I try to reference the external one I get:

$ cowsay -f Documents/Scripts/fujao.cow aaa
cowsay: could not find Documents/Scripts/fujao.cow cowfile

How do I get around this?

What about an manual?

Hello,

I've ported neo-cowsay to FreeBSD and I'm waiting it gets imported to ports: PR250771

What about an manual?

Original project manual is written in man legacy formatting language but I can write it from scratch in mdoc.

What do you think?

BTW --super option is awesome!

Thanks,

Nuno Teixeira

FreeBSD port: update failed from 2.0.1 -> 2.0.3

Hello,

I',m trying update FreeBSD port from 2.0.1 to 2.0.3 but I receive this error:

===> Building neo-cowsay from ./cmd/cowsay main module (github.com/Code-Hex/Neo-cowsay/v2) does not contain package github.com/Code-Hex/Neo-cowsay/v2/cmd/cowsay

Port Makefile uses:

GO_TARGET= ./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink so it gets to ./cmd/cowsay and builds it like cowthink (and changes is name to neo-*)

What should have changed from 2.0.1 that originates this error?

Full port Makefile:

PORTNAME=	neo-cowsay
DISTVERSIONPREFIX=	v
DISTVERSION=	2.0.3
CATEGORIES=	games

MAINTAINER=	[email protected]
COMMENT=	Neo Cowsay written in Go

LICENSE=	ART10 GPLv1+
LICENSE_COMB=	dual
LICENSE_FILE_GPLv1+ =	${WRKSRC}/LICENSE

USES=		go:modules
USE_GITHUB=	yes
GH_ACCOUNT=	Code-Hex
GH_PROJECT=	Neo-cowsay
GH_TUPLE=	\
		Code-Hex:go-wordwrap:v1.0.0:code_hex_go_wordwrap/vendor/github.com/Code-Hex/go-wordwrap \
		golang:xerrors:5ec99f83aff1:golang_xerrors/vendor/golang.org/x/xerrors \
		google:go-cmp:v0.5.6:google_go_cmp/vendor/github.com/google/go-cmp \
		mattn:go-runewidth:v0.0.13:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \
		rivo:uniseg:v0.2.0:rivo_uniseg/vendor/github.com/rivo/uniseg

GO_TARGET=	./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink

PLIST_FILES=	bin/neo-cowsay \
		bin/neo-cowthink

PORTDOCS=	README.md

OPTIONS_DEFINE=	DOCS

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}

post-install:
.for l in neo-cowsay neo-cowthink
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${l}
.endfor

.include <bsd.port.mk>

Thanks,

Nuno Teixeira

Cowfiles in binary do not work on Windows

I just downloaded the binaries on the releases page and it does not work out of the box, it gives out this error:

$ echo "Hello World!" | cowsay
cowsay: open cows\default.cow: file does not exist

Cannot install via `go install` since v2.0.2

I use go install github.com/Code-Hex/Neo-cowsay/v2/cmd/cowsay@latest to install the latest version, but it shows the following error:

go install: github.com/Code-Hex/Neo-cowsay/v2/cmd/cowsay@latest: module github.com/Code-Hex/Neo-cowsay/v2@latest found (v2.0.3), but does not contain package github.com/Code-Hex/Neo-cowsay/v2/cmd/cowsay

I think it is somehow related to subdirectory versioning.

go version go1.17.4 linux/amd64

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.