Blabber-Comic
Sample
How it works
Powered by Node and a node-canvas a comic can automatically be generated from a json array of users/text and some characters/backgrounds to be chosen at random.
How to use it from the CLI
Installing
Note: Your system may need some compiled dependencies for canvas to work.
npm install -g blabber-comic
Using
$ blabber
$ Who?: Glen
$ Said What?: Test 1
$ Another? (y/n) y
$ Who?: Sarah
$ Said What?: Test 2
$ Another? (y/n) y
$ Who?: Glen
$ Said What?: Test 3
$ Another? (y/n) n
$ Generating Comic...
$ [ Comic Generated @ comics/1.png ]
Additional Options
$ blabber --path ~/Pictures
How to use it in other projects
Generate base64Data
const blabbercomic = ;let messages = // Array of messages... ;
fs
Save as file with Example included in project. Clone then run npm run test
.
const blabbercomic = ;const fs = ;let messages = // Array of messages... ;
Customizing characters and backgrounds
const blabbercomic = ;let backgrounds = './assets/backgrounds/1.png' './assets/backgrounds/2.png';let characters = './assets/characters/1.png' './assets/characters/2.png' './assets/characters/3.png'; // Provide at least 3let comicSize = 500; // in px squarelet borderColor ='#CCCCCC';let font = 'Impact';let textColor: '#000000'; let messages = // Array of messages...let config = backgrounds characters comicSize borderColor font textColor ; ;
Special thanks to:
- node-canvas by Cairo
- avatars by Iulia Ardeleanu from the Noun Project
- backgrounds by Olga Libby from Subtle Patterns