Skip to content

Repository files navigation

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.

About

discord ANSI adapter

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages