Skip to content

Instantly share code, notes, and snippets.

@danielnunesdc
Last active June 24, 2018 18:06
Show Gist options
  • Save danielnunesdc/cb838ee9cde5ed1c551a21e0af35862e to your computer and use it in GitHub Desktop.
Save danielnunesdc/cb838ee9cde5ed1c551a21e0af35862e to your computer and use it in GitHub Desktop.

FIGlet

FIGlet is a program for making large letters out of ordinary text

FIGlet é uma ferramenta muito usada para customizar scripts. Ele converte o texto inserido em uma versão com vários caracteres, formando fontes maiores e bem interessantes.

Para instalar o FIGlet em distribuições linux baseadas no Debian, abra o terminal e digite:

sudo apt-get install figlet

Para instalar em outros sistemas, acesse o site oficial do projeto FIGlet.

Modo de usar:

Gerando um exemplo simples usando meu nome. No seu terminal digite:

figlet Daniel Nunes

A saída do programa foi:

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

Você pode centralizar o texto usando o parâmetro -c.

figlet -c Daniel Nunes

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

Também é possível trocar a fonte, mas antes verifique quais fontes você tem disponíveis em sua máquina:

ls /usr/share/figlet/*.flf

Caso deseje mais fontes, você pode conferir os modelos das fontes disponíveis em Exemplos de fontes e baixa-las em Banco de Fontes.

Para usar as fontes passe o parâmetro -f e o nome da fonte, como exemplo a fonte slant:

figlet -cf slant Daniel Nunes

             ____              _      __   _   __                     
            / __ \____ _____  (_)__  / /  / | / /_  ______  ___  _____
           / / / / __ `/ __ \/ / _ \/ /  /  |/ / / / / __ \/ _ \/ ___/
          / /_/ / /_/ / / / / /  __/ /  / /|  / /_/ / / / /  __(__  ) 
         /_____/\__,_/_/ /_/_/\___/_/  /_/ |_/\__,_/_/ /_/\___/____/  
                                                                      

Para conhecer outros parâmetros da ferramenta, digite:

man figlet

Links:

FIGlet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment