The Rfiglet Package

For those who don’t know what figlet is, it’s a command line utility for creating ascii logos.  Rfiglet, therefore, is a set of R bindings for figlet.

Works about like you would expect:

library(Rfiglet)
figlet("ascii")

#                _ _
#  __ _ ___  ___(_|_)
# / _\` / __|/ __| | |
#| (_| \\__ \\ (__| | |
# \\__,_|___/\\___|_|_|

There are over 150 fonts available, and you can see an example of each one in this Rfiglet package vignette.

We can even use our ascii art with another ascii package that emulates a command line utility, cowsay:

library(cowsay)
library(Rfiglet)

say(paste(figlet("longcat is long"), collapse="
"), "longcat")

## ----- 
## _                             _     _       _                   
## | | ___  _ __   __ _  ___ __ _| |_  (_)___  | | ___  _ __   __ _ 
## | |/ _ \| '_ \ / _` |/ __/ _` | __| | / __| | |/ _ \| '_ \ / _` |
## | | (_) | | | | (_| | (_| (_| | |_  | \__ \ | | (_) | | | | (_| |
## |_|\___/|_| |_|\__, |\___\__,_|\__| |_|___/ |_|\___/|_| |_|\__, |
##               |___/                                       |___/  
## ------ 
##    \   
##     \
##    .ハ,,ハ
##    ( ゚ω゚)
##    |つ  つ
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    |    |
##    U "  U
##        [BoingBoing]

For those of you who are familiar with integrating compiled code into R, you may find my approach in this package somewhat amusing/horrifying.

 

Figlet as a Service

As we all know, software’s out and services are in.  That’s why I also created Figlet as a Service.  Ascii is finally ready for the enterprise.