Create ANSI art and render it with speech bubbles inside node.
https://gauravchl.github.io/ansi-art/webapp/
Steps:
-
Create and download the ANSI art from webapp: https://gauravchl.github.io/ansi-art/webapp/
-
Install
npm install ansi-art
package to render the downloaded art file. -
You can also render existing art files directly which is available inside repo: '/src/arts/'.
Examples:
// Using existing art
import ANSI from 'ansi-art';
let mario = ANSI.get({artName: 'mario'});
console.log(mario);
// Using custom art file
import ANSI from 'ansi-art';
let art = ANSI.get({filePath: '~/desktop/custom-art.ansi'})
console.log(art);
// Using Speech bubble
import ANSI from 'ansi-art';
let art = ANSI.get({artName: 'mario', speechText: 'Hello world'}
console.log(art);
ANSI.get(options):
Parameter | Type | Description |
---|---|---|
options.filePath | string | Path to custom ANSI art file(eg: ~/mario.ansi) |
options.artName | string | Name of existing ANSI art available within package.See available arts |
options.speechText | string | If provided, render the text inside 'speech bubble' above the ANSI art |
Mario credits: https://github.com/acarl005/node-super-mario
Parrot credits: https://github.com/matheuss/parrotsay-api
Contributing
Please feel free to submit any bugs or suggestions as issues or request to add any art into existing collections. Pull requests are welcome.