Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 977 Bytes

File metadata and controls

44 lines (29 loc) · 977 Bytes

daad: Discord ANSI adapter

Converts ANSI color escape sequences from stdin into the limited 4-bit sequences supported by discord. Selects the Discord color with the lowest Euclidian distance to the target color.

Demo

git diff --color=always

image

git diff --color=always | discord-ansi-adapter | discord-message

image

Usage

To adapt the ANSI escape sequences:

some command here | discord-ansi-adapter

To break up stanard input into messages that are <2000 characters long and HTTP POST to a Discord webhook URL:

# setup a discord webhook
export DISCORD_WEBHOOK_URL='...'
some command here | discord-message

Installation

pip install git+https://github.com/simonLeary42/daad

daad has zero dependencies.