View on GitHub

Jfiglet

Java implementation of FIGfonts http://www.figlet.org/

Download this project as a .zip file Download this project as a tar.gz file

jfiglet

Java implementation of FIGfonts to create ascii art banners. My goals were:

I started out from BenoƮt Rigaut, Juillet work found at www.rigaut.com

Figlet

figlet is a command-line tool which helps you to create ascii banners like this:

     _  _____  ___   ____  _      _____  _____
    | ||  ___||_ _| / ___|| |    | ____||_   _|
 _  | || |_    | | | |  _ | |    |  _|    | |  
| |_| ||  _|   | | | |_| || |___ | |___   | |  
 \___/ |_|    |___| \____||_____||_____|  |_|  

Figlet has a specification which is included into the repo for easy access here

Usage

you can use it from command line or from java code

Maven dependency

add the following maven dependency to your pom.xml

<dependency>
    <groupId>com.github.lalyos</groupId>
    <artifactId>jfiglet</artifactId>
    <version>0.0.3</version>
</dependency>

Snapshot repo

Or if you want to use the latest development version, you can use the github based snapshot repo:

<repositories>
    <repository>
        <id>lalyos-snapshots</id>
        <url>https://github.com/lalyos/mvn-repo/raw/master/snapshots</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.lalyos</groupId>
    <artifactId>jfiglet</artifactId>
    <version>0.0.4-SNAPSHOT</version>
</dependency>

Then use the convertOneLine() static method to do the magic

import com.github.lalyos.jfiglet.FigletFont;

public class App {
  public static void main(String[] args) {
    String asciiArt = FigletFont.convertOneLine("hello");
    System.out.println(asciiArt);
  }
}

command line

You can use the jar from the central repo, or use the latest development version from sourcecode;

from source

git clone git@github.com:lalyos/jfiglet.git
cd jfiglet
mvn exec:java -Dexec.arguments="jfiglet rulez"

from maven central

curl -o jfiglet.jar http://central.maven.org/maven2/com/github/lalyos/jfiglet/0.0.3/jfiglet-0.0.3.jar
java -jar jfiglet.jar "text to convert"

Related projects

First I wrapped http://artii.herokuapp.com/ which is based on the artii gem I found 2 java implementations:

Todo