Print any image in ascii anywhere (browser/cli)
Globally run unascii with npx
:
npx @shba007/unascii@latest ./file/path.jpg
or
npx @shba007/unascii@latest ./file/path.jpg --width=50
Options:
--width Width of the image
--widthSkew Width Skew of the image
--output <console|file> Output as file or console
--characters <minimalist|normal|normal2|alphabetic|alphanumeric|numerical|extended|math|arrow|grayscale|max|codepage437|blockelement> Output Character Set
--grayscale <true|false> Output as grayscale or color only works with console
Use npx @shba007/unascii --help
for more usage info.
Install package:
# ✨ Auto-detect
npx nypm install @shba007/unascii
# npm
npm install @shba007/unascii
# yarn
yarn add @shba007/unascii
# pnpm
pnpm install @shba007/unascii
# bun
bun install @shba007/unascii
Import:
ESM (Node.js, Bun)
import {} from '@shba007/unascii'
CommonJS (Legacy Node.js)
const {} = require('@shba007/unascii')
CDN (Deno, Bun and Browsers)
import {} from 'https://esm.sh/@shba007/unascii'
local development
Published under the MIT license.