项目作者: syzer

项目描述 :
Convert image url to ascii art
高级语言: JavaScript
项目地址: git://github.com/syzer/img2ascii.git
创建时间: 2016-01-25T20:31:22Z
项目社区:https://github.com/syzer/img2ascii

开源协议:

下载


img2ascii

Greenkeeper badge

NPM Version
Dependency Status
Downloads Today
Downloads Month
Build Status

Purpose

  • Downloads images (jpeg/gif/png) and outputs them in your console.
  • Make custom ssh login message for your users.
  • Picture is worth thousands words.. we will use both!

Doge In terminal

Getting Started

  1. brew install graphicsmagick
  2. npm install -g img2ascii

Usage CLI

  1. Usage: img2ascii [url|file] --cols [num] --ratio [num]
  2. Options:
  3. -c, --cols Number of columns in terminal [default: 80]
  4. -r, --ratio Aspect ratio. Try 0.5 to flatten image
  5. and 2 to lengthen image [default: 1]

Examples

  1. img2ascii doge.png
  2. img2ascii https://pbs.twimg.com/profile_images/378800000822867536/3f5a00acf72df93528b6bb7cd0a4fd0c.jpeg
  3. img2ascii doge.png --cols 20 --ratio 0.5

Usage as module

  1. const img2ascii = require('img2ascii')({
  2. img: './assets/snafu.gif',
  3. cols: 90, // optional
  4. ratio: 1.2 // optional
  5. }).pipe(process.stdout)