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.
git diff --color=alwaysgit diff --color=always | discord-ansi-adapter | discord-messagesome command here | discord-ansi-adapterTo use the primitive message sending helper script:
# setup a discord bot
export DISCORD_BOT_TOKEN='...'
export DISCORD_CHANNEL_ID='...'
some command here | discord-messageusing uv:
uv tool install git+https://github.com/simonLeary42/daadusing pip:
pip install git+https://github.com/simonLeary42/daad
