Giter Site home page Giter Site logo

cowsay's Introduction

Codacy Badge Build Status

Cowsay

Java port of the original cowsay by Tony Monroe. Moo!

 ______________________________
< Available on Maven Central! >
 ------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Download

The JAR available on Maven Central is The One JAR and can be used in any of the advertised ways:

  • Maven Plugin
  • Java library on the classpath
  • Ant Task
  • Self Executing JAR

The last two scenarios in particular may require you to manually download The One JAR from Maven. It will be named following the convention cowsay-{version}.jar.

For example if you want version 1.0.3 you would go here and download cowsay-1.0.3.jar.

One JAR to rule the cows, One JAR to find them, One JAR to bring them all, and in the pasture bind them

Usage

All the ways of using it support configuration consistent with the commandline flags of the original application. Documentation can be found in various man pages on the web.

Additional flags not found in the original cowsay

  • --html HTML output mode, produces accessible HTML5
  • --alt <arg> Choose your own alt text for HTML output mode
  • --lang <arg> Switch language

As a Java library

Use the main methods Cowsay.say and Cowsay.think.

Example:

String[] args = new String[]{"-f", "tux", "Moo!"};
String result = Cowsay.say(args);

As an executable jar

Example:

java -jar cowsay.jar "Moo!"
java -jar cowsay.jar -f tux "Moo!"
java -jar cowsay.jar --cowthink "Moo!"

As an Ant task

Example:

<taskdef name="cowsay"
			classname="com.github.ricksbrown.cowsay.ant.CowsayTask"
			classpath="cowsay.jar"/>

<cowsay message="Moo!"/>
<cowsay message="Moo!" think="true"/><!-- cowthink -->
<cowsay message="Moo!" mode="b"/><!-- Borg mode -->
<cowsay message="Long live linux!" cowfile="tux"/>
<cowsay message="Moo!" eyes="Oo" tongue=" U"/>

As a Maven plugin

Example:

<plugin>
	<groupId>com.github.ricksbrown</groupId>
	<artifactId>cowsay</artifactId>
	<version>1.0.3</version>
	<executions>
		<execution>
			<id>say-moo</id>
			<phase>compile</phase>
			<goals>
				<goal>moo</goal>
			</goals>
			<configuration>
				<message>Compiling awesome stuff...</message>
				<!-- Other options:
				<eyes>Oo</eyes>
				<cowfile>sheep</cowfile>
				<mode>b</mode>
				<think>true</think>
				<tongue> V</tongue>
				<wrap>60</wrap>
				-->
			</configuration>
		</execution>
	</executions>
</plugin>
 ____________________________
< Compiling awesome stuff... >
 ----------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Internationalization

This version of cowsay fully supports i18n.

New and/or improved translations welcome - the default (English) messages can be found in the file src/main/resources/MessagesBundle.properties

Building

  1. git clone --recursive https://github.com/ricksbrown/cowsay.git
  2. cd cowsay
  3. mvn install

Contributing

Pull requests welcome (as long as they incorporate a "moo" somewhere)!

Stats

As of April 2017 this tool is downloaded over 60 times a month. The peak so far is 105 times in January 2017.

cowsay's People

Contributors

codacy-badger avatar ricksbrown avatar

Watchers

 avatar  avatar  avatar

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.