Hacker News new | past | comments | ask | show | jobs | submit login
figlet – a program for making large letters out of ordinary text (figlet.org)
164 points by pmoriarty 29 days ago | hide | past | favorite | 61 comments



If you like figlet, than let me tell you, you'll like toilet [0] even more!

TOIlet can do everything figlet can do, but it can also do colors, more interesting fonts, and output to html and a couple other formats.

[0]: http://caca.zoy.org/wiki/toilet


If you happen to use something like direnv, I like use

toilet Projectname -f future --gay

It gives me great pleasure to have a project banner this way, every time I cd into the project directory.


Oooh, direnv, never heard of that. It's like directory-local variables in Emacs, only for the shell!


directory-local variables in emacs? thank you! I will look at that.



Looking at the website, I can see it's not been updated in several years, so maybe the use of 'gay' as a filter can be forgiven, but I think I'd prefer that filter to be called 'rainbow' or something.

Edit: the links to the git repository are down as well.


If the word "gay" was being used as a pejorative then I'd fully agree with you. When I was at school it was _the_ insult to use, and in the context of an adjective meant that things were lame, pathetic and bad. It was used everywhere and constantly, and as someone who identified as LGBT every time I heard it in passing I'd panic slightly and my heart would skip a beat.

This is the exact opposite though. The `--gay` flag is the best option; it's the most colourful, flashy and fun. I _want_ more people to use the term in a positive context because every time it happens, the pejorative context looses more power and anything that stops these sorts of words being weaponised is a good thing.

And as other commenters have already said, it gets defined in dictionaries as "light-hearted and carefree" or "brightly coloured; showy.", both of which descriptions fit the use case perfectly.


Google for "what a gay day" and, if you are entertained by such stories, read all about Larry Grayson, the prime time game show host in my childhood and the most incredibly awesome man who slogged his way into showbiz through two decades of gruelling nearly empty houses in Yorkshire miners / working men's clubs where he, among other acts, put on full drag.

I don't believe that the present time is actually more open and safe for different folk. When I grew up nobody but nobody would dare to speak of anyone's sexuality let alone make a point of it and assaulting up a homosexual man would land you on hospital when the neighbours reacted in horror at the effective attack on the man's mother (I confess to typing on gay men living with their mothers but I didn't know one exception until moving to London in the late 80s. Mining towns in Yorkshire were probably the safest place to be gay ever. You wouldn't be "out" only because nobody's private lives were on display. The untold horror of the Thatcher breaking of the National Union of Miners is the fractures through communities unravelled the most intricate social support web and exposed the most vulnerable people to possibly the most heightened emotional communal period in post war England. The miner's union was also a huge contributor to the widows most likely to have their gay sons looking after them and the collapse in union finances forced many ill prepared and not still young gay men to seek better economic possibility. Sending ca 40 yr old highly protected parochial gay men who would do anything for their mums or the mere idea of their mothers, into late 80s cities in search of suitable work, was just the most terrible consequence.


I'm so sorry I entirely forgot my pertinent point :

I am totally for the general public recapturing the word gay because of the positive effect this will transfer to historic derogation and separate identification of homosexual men as gay.

First, I think this is well appreciated now, different folk reappropriated the word gay from pejorative connotation.

But it only worked so far.

Gay was a prejorative quite without any sexual inflection or connotation. "Don't be gay man" criticising the way someone is digging a trench for the vegetable garden, is entirely valid and non assimilative of personal sexuality Derogation. That phrase is akin to "we're not digging up the begonia bed lad, this is our potatoes for the whole year and if you don't do that double trench properly the first frosts will have the lot ". I have obviously expanded and provided explanatory context. There's nothing gay about double trenching potatoes in late fall at the same londitude as Moscow.

If I had to define the derogatory use of gay, my own experience would make me place far more emphasis on the adduced insult to be ineffectual or unnecessarily fancy and therefore wasteful and inefficient. From there to get to mean not very manly seems to me a much easier etymological path.


I doubt the author asks for forgiveness, it's a switch for enabling happy colors and nothing more. If they choose to call it gay, HBTQ, pride, happy, mdma, techno, acid or happy is very much up to them to do without being judged.


> [...] I think I'd prefer that filter to be called 'rainbow' or something.

That is, in fact, exactly what the author did.

https://github.com/cacalabs/toilet/commit/be1054fefd6cda23ca...


Aha cool, I couldn't find a working link on the website to the git, as I DID want to check before bringing it up.


google define: gay

* "light-hearted and carefree."

* "brightly coloured; showy."


Point being, gay meant happy/lighthearted way before it started to also mean homosexual: https://www.thefreedictionary.com/gay

Etymology excerpt: [Middle English gai, lighthearted, brightly colored, from Old French, possibly of Germanic origin.]


In high school I learned gai in French means cheerful. The joy some 13 year olds had with that word.

Incidentally, the developer of the tool, Sam Hocevar, is French.

For me the colours are by default in Solarized Dark, which skews the 16 colors into, well, in this case French flag colours. To test this, consider $ msgcat --color=test


What’s to forgive exactly?


From caca labs, the producers of libcaca.

you can also play videos with it:

-vo=caca on mpv or mplayer

You really can't make this up...


This blew my mind the first time I saw it.

Similar feeling to seeing my face manipulated by a WebGL shader.

I wonder if I can use for video calls...


Just with the name of the library, I knew who made it ;) . Sam Hocevar is an exceptional developer but can't help himself when it comes to naming his project :) .


On 11 different platforms? :)


How many more lines of code?


Looks great, but that name is off-putting.


The longevity of figlet is astounding. I remember downloading the source in either late 1993 or early 94, and porting it to the Acorn Archimedes, considered ultra high end workstations for the time.

And it's still around! Amazing.


20+ years ago I used to use this online figlet generator for "MOTD" : http://www.network-science.de/ascii/

Also amazed that this is still online!


> And it's still around! Amazing.

Depends in your definition of "still around". Last update over 8 years ago.


I really think we should take a step back and consider that, sometimes, a piece of software is fulfilling a particular function. Once it is proven stable and efficient, no more updates are needed. Lots of problems in our profession could be solved if we had this paradigm in mind at all times while working.


Agreed. However we need to devise a way to distinguish between a project that's more or less "done" to one that's hopelessly abandoned and a way to mark old projects as such.


How do you update perfection?


I'm not saying it needs updates. I'm just questioning "still around". Being around is not an accomplishment in the age of oldversion.com and archive.org.


I am sure I could go find out, but just asking here for posterity... I feel like linux distros are going down dark paths. I have had figlet on my computer for many years, and on this distro for at least two years. TheDong notes that Toilet is another really cool tool. I install it on my Linux Mint box here, and boom, figlet is not only removed, but it now links to toilet:

ls -l /usr/bin/figlet lrwxrwxrwx 1 root root 24 Oct 29 08:15 /usr/bin/figlet -> /etc/alternatives/figlet

ls -l /etc/alternatives/figlet lrwxrwxrwx 1 root root 22 Oct 29 08:15 /etc/alternatives/figlet -> /usr/bin/figlet-toilet

Note the dates on the above, the fact is that I have had figlet on this computer for at least two years, but I just did an apt-get install toilet and it replaced figlet.

ls -l /usr/bin/toilet -rwxr-xr-x 1 root root 23064 Mar 13 2018 /usr/bin/toilet

And the figlet --help gives toilet output and the output is from toilet. I had to remove toilet and re-install figlet to get figlet back.

I feel that is odd behaviour for a distro.


Are you sure that it removed figlet, and didn't just change the config in the alternatives system? I have both installed on 16.04.

Try:

$ sudo update-alternatives --config figlet

I have two choices: /usr/bin/figlet-figlet and /usr/bin/figlet-toilet

to see what package provides each binary:

$ dpkg -S /usr/bin/figlet-figlet

figlet: /usr/bin/figlet-figlet

$ dpkg -S /usr/bin/figlet-toilet

toilet: /usr/bin/figlet-toilet

you should be able to choose figlet-figlet with update-alternatives if you want to use real figlet. But IIRC toilet is intended to be 100% backwards compatible, so there's probably not any real reason to do that (?).

Or, you should be able to invoke figlet with 'figlet-figlet' on the CLI.

...assuming, of course, that my assumption is correct and it didn't actually remove figlet... :)


I don't know about Mint, but over here on Debian, figlet and toilet suggest each other. So, if you install figlet, then install toilet too, figlet won't actually be uninstalled, but the alternatives mechanism may decide that toilet is better at being figlet than figlet is. You can undoubtedly restore sanity using the update-alternatives command.


toilet requires figlet for fonts, figlet only suggests toilet, and by default apt installs recommends, but not suggests AIUI


                               _/      _/        _/              
      _/_/    _/  _/_/      _/_/_/_/  _/_/_/          _/_/_/   
   _/    _/  _/_/            _/      _/    _/  _/  _/_/        
  _/    _/  _/              _/      _/    _/  _/      _/_/     
   _/_/    _/                _/_/  _/    _/  _/  _/_/_/
"or this". I really like the shadow effect on this. Really clever!


Ah, the pang of nostalgia... :) The last time I was playing with something like this was on a Commodore 64.


I've used banner, then figlet, then toilet.

they are especially useful for scripts where you want to print out milestones.

but.

All pale in comparison to ponysay.


tractorgen is all I ever need

     kalleboo-iPhone-11-Pro-Max:~/tractorgen-0.31.7# tractorgen
 1
    tractorgen: ERROR!! Tractors must have at least four wheels!! FOOL!
    Aborted


Are you running that on iSH or a jailbroken iPhone?


iSH


  tractorgen 17 | tractorgen-animator


ponysay is neat, but i do cowsay + lolcat


is that still a thing? the my little pony series?


I believe the multicolored ascii art with 400+ variants is great by itself.

It's kind of like one of those movie franchise reboot sequels that turns out to be a good movie just on its merits.


Ah, I love figlet. One of my favourite fun cli programs right alongside lolcat¹ and fortune². In fact, my startup prompt is fortune -o piped to lolcat.

[1]: https://github.com/busyloop/lolcat

[2]: https://linux.die.net/man/6/fortune


Add cowsay to that list.


How did I live this long without lolcat in my life?


Unrelated, but I just love sites like these. No cookies, no JavaScript, no images, no trackers, heck, I'm even OK with no HTTPs here (but should probably be HTTPs for path/method privacy).

I'm still able to do the same things I would usually do on the more "modern" sites -- navigate, find info, look at examples, etc...


In case you're curious:

  $ figlet hi
   _     _ 
  | |__ (_)
  | '_ \| |
  | | | | |
  |_| |_|_|
           
  $ figlet hii
   _     _ _ 
  | |__ (_|_)
  | '_ \| | |
  | | | | | |
  |_| |_|_|_|
             
  $ figlet olé
         _  /\/|  _____   
    ___ | ||/\/  / ___ \  
   / _ \| | /_\ / / __| \ 
  | (_) | |/ _ \ | (__   |
   \___/|_/_/ \_\ \___| / 
                 \_____/


Just as I thought. We all live in America.


Also see this great collection of figlet fonts:

https://github.com/xero/figlet-fonts


small plug - around 6 years ago I created a javascript game that uses Figlet fonts to make arbitrary Atari Breakout-ish boards. Here is a demo - https://jarv.gitlab.io/figlet-breakout/


Before you use this, check how it sounds in a screenreader


I've seen a lot of projects use things like this for banners and messages, so it would be neat if projects like figlet, toilet, cowsay, etc. would add an "undo" feature that could be passed this sort of text and convert it to plaintext, so that screenreaders could use that to read such banners.

Probably just wishful thinking though.


termdown is worth a mention https://github.com/trehn/termdown

It's a countdown timer that uses figlet to render the countdown. Here's a pomodoro timer script I use fairly often (`bup` is another script that emits a low pitched beep (a bup)):

    #!/bin/bash

    if [ $# -ne 1 ]; then
      echo $0: usage: pomodoro time_expr
      exit 1
    fi

    TIME_EXPR=$1

    get_time ()
    {
      date "+%H:%M"
    }

    START=$(get_time)
    termdown --font big --critical 0 $TIME_EXPR \
      && bup
    END=$(get_time)
    echo "$START - $END"


There's a good website I use for this so I don't need a program, but I can't remember the one I use. It's not modern by any means, but it really does a decent job in the presentation of all loaded text types


I usually use this one: http://patorjk.com/software/taag/


Yep, this one is great.

Curiously it has a Figlet.js: http://patorjk.com/software/taag/js/figlet.js

/*

    FIGlet.js (a FIGDriver for FIGlet fonts)
    By Patrick Gillespie (patorjk@gmail.com)
    Originally Written For: http://patorjk.com/software/taag/
    License: MIT (with this header staying intact)

    This JavaScript code aims to fully implement the FIGlet spec.
    Full FIGlet spec: http://patorjk.com/software/taag/docs/figfont.txt
    
    If you use this for a public app, a link back to TAAG is appreciated  
    but not necessary.
*/


There is a python port: https://github.com/pwaller/pyfiglet at least for what I made it was pretty nifty


A post I wrote about toilet years ago: https://sequoia.makes.software/fun-with-toilet/


This is a lovely program, I used it with some of my vim plugins' documentation.


figlet and cowsay are integral to the unix experience imo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: