old-man-yells-at
v1.1.0
Published
Old man yells at generator
Readme
You've got an opinion. A strong one. About something that probably doesn't deserve this much energy. old-man-yells-at is a TypeScript package that turns that frustration into art — specifically, Abe Simpson shaking his fist at whatever you point it at. Pass in a target, get back a meme. Simple as that.
Getting Started
CLI
# run directly with npx
npx old-man-yells-at <input-image> [output-file]
# examples
npx old-man-yells-at photo.png # outputs old-man-yells-at.png
npx old-man-yells-at photo.png meme.png # custom output path
npx old-man-yells-at photo.png -s 256 # custom size (default: 128)Install
npm install old-man-yells-at@v1Programmatic Usage
import { yellAt } from 'old-man-yells-at';
// create a meme and save it to a file
const builder = await yellAt('path/to/target.png');
await builder.toFile('output.png');
// customize the output size
await yellAt('path/to/target.png')
.then((b) => b.resize(256, 256).toFile('output.png'));
// get the result as a buffer
const buffer = await (await yellAt('path/to/target.png')).toBuffer();
// get the result as a sharp instance for further processing
const sharpInstance = await (await yellAt('path/to/target.png')).toSharp();