pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

ascii-art Convert text to ASCII art using FIGlet fonts

⚡ Gen
Input0 chars
Output0 chars

Flags

--font select: Standard | Big | Slant | Banner3 default: Standard

Examples

Generate a banner for deploy notifications

Usage
"SHIP IT" | ascii-art

Create an eye-catching header for a text-based email blast

Usage
"SALE" | ascii-art

Make a fun birthday banner for a Slack channel

Usage
"Happy Bday" | ascii-art
View source
async (input, opts = {})=>{
                if (!input.trim()) return "";
                try {
                    const figlet = await import('figlet').then(async (m)=>{
                        await m.__tla;
                        return m;
                    });
                    const fontName = opts.font || "Standard";
                    const fonts = {
                        Standard: ()=>import('figlet/importable-fonts/Standard.js').then(async (m)=>{
                                await m.__tla;
                                return m;
                            }),
                        Big: ()=>import('figlet/importable-fonts/Big.js').then(async (m)=>{
                                await m.__tla;
                                return m;
                            }),
                        Slant: ()=>import('figlet/importable-fonts/Slant.js').then(async (m)=>{
                                await m.__tla;
                                return m;
                            }),
                        Banner3: ()=>import('figlet/importable-fonts/Banner3.js').then(async (m)=>{
                                await m.__tla;
                                return m;
                            })
                    };
                    const fontModule = await fonts[fontName]();
                    figlet.default.parseFont(fontName, fontModule.default);
                    return figlet.default.textSync(input, {
                        font: fontName
                    });
                } catch (e) {
                    return `Error: ${e.message}`;
                }
            }

Related Tools