[go: nahoru, domu]

Skip to content
forked from yihleego/banana

A FIGlet Utils for Java that generates text banners, in a variety of typefaces, composed of letters made up of conglomerations of smaller ASCII characters.

License

Notifications You must be signed in to change notification settings

LH-Rider/banana

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banana

A FIGlet Utils for Java.

What is FIGlet

FIGlet is a computer program that generates text banners, in a variety of typefaces, composed of letters made up of conglomerations of smaller ASCII characters (see ASCII art). The name derives from "Frank, Ian and Glenn's letters".

Being free software, FIGlet is commonly included as part of many Unix-like operating systems (Linux, BSD, etc.) distributions, but it has been ported to other platforms as well. The official FIGlet FTP site includes precompiled ports for the Acorn, Amiga, Apple II, Atari ST, BeOS, Macintosh, MS-DOS, NeXTSTEP, OS/2, and Windows platforms, as well as a reimplementation in Perl (Text::FIGlet). There are third-party reimplementations of FIGlet in Java (including one embedded in the JavE ASCII art editor), JavaScript, PHPand Python. FIGlet was featured as a Debian Package of the Day in 2007.

Usage

An example

BananaUtils.bananaify("Hello, Github!");

Output:

  _   _      _ _           ____ _ _   _           _     _ 
 | | | | ___| | | ___     / ___(_) |_| |__  _   _| |__ | |
 | |_| |/ _ \ | |/ _ \   | |  _| | __| '_ \| | | | '_ \| |
 |  _  |  __/ | | (_) |  | |_| | | |_| | | | |_| | |_) |_|
 |_| |_|\___|_|_|\___( )  \____|_|\__|_| |_|\__,_|_.__/(_)
                     |/                                   

Multiline

String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n"
        + "abcdefghijklmnopqrstuvwxyz\n"
        + "1234567890" + ". : , ; ' \" \\ ( ! ? ) + - * / =";
BananaUtils.bananaify(s);

Output:

     _    ____   ____ ____  _____ _____ ____ _   _ ___    _ _  ___     __  __ _   _  ___  ____   ___  ____  ____ _____ _   ___     ____        ____  ____   _______
    / \  | __ ) / ___|  _ \| ____|  ___/ ___| | | |_ _|  | | |/ / |   |  \/  | \ | |/ _ \|  _ \ / _ \|  _ \/ ___|_   _| | | \ \   / /\ \      / /\ \/ /\ \ / /__  /
   / _ \ |  _ \| |   | | | |  _| | |_ | |  _| |_| || |_  | | ' /| |   | |\/| |  \| | | | | |_) | | | | |_) \___ \ | | | | | |\ \ / /  \ \ /\ / /  \  /  \ V /  / / 
  / ___ \| |_) | |___| |_| | |___|  _|| |_| |  _  || | |_| | . \| |___| |  | | |\  | |_| |  __/| |_| |  _ < ___) || | | |_| | \ V /    \ V  V /   /  \   | |  / /_ 
 /_/   \_\____/ \____|____/|_____|_|   \____|_| |_|___\___/|_|\_\_____|_|  |_|_| \_|\___/|_|    \__\_\_| \_\____/ |_|  \___/   \_/      \_/\_/   /_/\_\  |_| /____|
   __ _| |__   ___ __| | ___ / _| __ _| |__ (_)(_) | _| |_ __ ___  _ __   ___  _ __   __ _ _ __ ___| |_ _   ___   ____      ____  ___   _ ____                     
  / _` | '_ \ / __/ _` |/ _ \ |_ / _` | '_ \| || | |/ / | '_ ` _ \| '_ \ / _ \| '_ \ / _` | '__/ __| __| | | \ \ / /\ \ /\ / /\ \/ / | | |_  /                     
 | (_| | |_) | (_| (_| |  __/  _| (_| | | | | || |   <| | | | | | | | | | (_) | |_) | (_| | |  \__ \ |_| |_| |\ V /  \ V  V /  >  <| |_| |/ /                      
  \__,_|_.__/ \___\__,_|\___|_|  \__, |_| |_|_|/ |_|\_\_|_| |_| |_|_| |_|\___/| .__/ \__, |_|  |___/\__|\__,_| \_/    \_/\_/  /_/\_\\__, /___|                     
  _ ____  _____ _  _  ____   __ _|___/___  __|__/___                 _   _ _  |_|      _|_|_   ___  __                              |___/                          
 / |___ \|___ /| || || ___| / /|___  ( _ )/ _ \ / _ \    _       _  ( ) ( | ) \ \     / / | | |__ \ \ \     _            __/\__    / /  _____                      
 | | __) | |_ \| || ||___ \| '_ \ / // _ \ (_) | | | |  (_)     (_) |/   V V   \ \   | |  | |   / /  | |  _| |_   _____  \    /   / /  |_____|                     
 | |/ __/ ___) |__   _|__) | (_) / /| (_) \__, | |_| |   _   _   _              \ \  | |  |_|  |_|   | | |_   _| |_____| /_  _\  / /   |_____|                     
 |_|_____|____/   |_||____/ \___/_/  \___/  /_/ \___(_) (_) ( ) ( )              \_\ | |  (_)  (_)   | |   |_|             \/   /_/                                
                                                            |/  |/                    \_\           /_/                                                            

More fonts

List<String> fonts = BananaUtils.fonts();
for (String font : fonts) {
    BananaUtils.bananaify("Hello, Github!", font);
}

Examples:

[3D-ASCII]
 ___  ___  _______   ___       ___       ________                ________  ___  _________  ___  ___  ___  ___  ________  ___       
|\  \|\  \|\  ___ \ |\  \     |\  \     |\   __  \              |\   ____\|\  \|\___   ___\\  \|\  \|\  \|\  \|\   __  \|\  \      
\ \  \\\  \ \   __/|\ \  \    \ \  \    \ \  \|\  \             \ \  \___|\ \  \|___ \  \_\ \  \\\  \ \  \\\  \ \  \|\ /\ \  \     
 \ \   __  \ \  \_|/_\ \  \    \ \  \    \ \  \\\  \  ___        \ \  \  __\ \  \   \ \  \ \ \   __  \ \  \\\  \ \   __  \ \  \    
  \ \  \ \  \ \  \_|\ \ \  \____\ \  \____\ \  \\\  \|\  \        \ \  \|\  \ \  \   \ \  \ \ \  \ \  \ \  \\\  \ \  \|\  \ \__\   
   \ \__\ \__\ \_______\ \_______\ \_______\ \_______\ \  \        \ \_______\ \__\   \ \__\ \ \__\ \__\ \_______\ \_______\|__|   
    \|__|\|__|\|_______|\|_______|\|_______|\|_______|\/  /|        \|_______|\|__|    \|__|  \|__|\|__|\|_______|\|_______|   ___ 
                                                    |\___/ /                                                                  |\__\
                                                    \|___|/                                                                   \|__|
                                                                                                                                   
[ANSI_Shadow]
██╗  ██╗███████╗██╗     ██╗      ██████╗         ██████╗ ██╗████████╗██╗  ██╗██╗   ██╗██████╗ ██╗
██║  ██║██╔════╝██║     ██║     ██╔═══██╗       ██╔════╝ ██║╚══██╔══╝██║  ██║██║   ██║██╔══██╗██║
███████║█████╗  ██║     ██║     ██║   ██║       ██║  ███╗██║   ██║   ███████║██║   ██║██████╔╝██║
██╔══██║██╔══╝  ██║     ██║     ██║   ██║       ██║   ██║██║   ██║   ██╔══██║██║   ██║██╔══██╗╚═╝
██║  ██║███████╗███████╗███████╗╚██████╔╝▄█╗    ╚██████╔╝██║   ██║   ██║  ██║╚██████╔╝██████╔╝██╗
╚═╝  ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝     ╚═════╝ ╚═╝   ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝
                                                                                                 
[Small]
  _  _     _ _          ___ _ _   _        _    _ 
 | || |___| | |___     / __(_) |_| |_ _  _| |__| |
 | __ / -_) | / _ \_  | (_ | |  _| ' \ || | '_ \_|
 |_||_\___|_|_\___( )  \___|_|\__|_||_\_,_|_.__(_)
                  |/                              

[Standard] (Default font)
  _   _      _ _           ____ _ _   _           _     _ 
 | | | | ___| | | ___     / ___(_) |_| |__  _   _| |__ | |
 | |_| |/ _ \ | |/ _ \   | |  _| | __| '_ \| | | | '_ \| |
 |  _  |  __/ | | (_) |  | |_| | | |_| | | | |_| | |_) |_|
 |_| |_|\___|_|_|\___( )  \____|_|\__|_| |_|\__,_|_.__/(_)
                     |/            

More

Click here to see more fonts.

Contact

Links

License

Banana is under the Apache 2.0 license. See the LICENSE file for details.

About

A FIGlet Utils for Java that generates text banners, in a variety of typefaces, composed of letters made up of conglomerations of smaller ASCII characters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%