8000 GitHub - slwulf/emojitools: a suite of image manipulation tools for editing slack emoji
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

slwulf/emojitools

Repository files navigation

emojitools

the cool slack emoji manipulation interface for cool kids

Usage

First, install the package into your project.

npm install @slwulf/emojitools

Then, import the package and execute a command.

const Emojitools = require('@slwulf/emojitools')
const cli = 'effects +Intensify http://path.to/my/image'

Emojitools.fromCommandLineInput(cli)
    .then(emoji => emoji.message ? console.log(emoji.message) : emoji.writeToFile())
    .then(filepath => filepath && console.log(filepath))

Emojitools is intended to be used as a command line or chat bot interface, so the static method EmojiTools.fromCommandLineInput, which receives raw user input, is the best way to use it.

The package exposes an emoji interface as its execution result that allows you to access or further modify a command's output. Read below for more details on working with the image output.

The command line interface has built-in help text for each command. Entering emojitools --help will expose a list of commands, and emojitools <command> --help describes each command and its inputs.

API Documentation

Emojitools

  • Emojitools.fromCommandLineInput(cli[, opts])
    • cli (string) the command line input
    • opts (object) render and behavior options
      • plaintext (boolean) determines whether emoji.message is in plaintext or markdown. defaults to false, for markdown.
    • Returns a Promise that resolves to an Emoji instance.

Emoji

  • emoji.message (?string)
    • a property that will be set if an emoji was not rendered, usually because help text was requested instead.
  • emoji.saveToFile([filepath])
    • filepath (string) optional, absolute path the file should be saved at
    • Returns a Promise that resolves to the saved filepath of the rendered emoji
  • emoji.saveToReadStream()
    • Returns a Promise that resolves to a stream.Readable instance of the rendered emoji

About

a suite of image manipulation tools for editing slack emoji

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0