make_it_braille

Crates.iomake_it_braille
lib.rsmake_it_braille
version0.5.1
sourcesrc
created_at2024-02-10 01:30:53.721306
updated_at2024-04-24 05:42:20.479939
descriptionA CLI tool and library to manipulate unicode braille images
homepage
repository
max_upload_size
id1134587
size83,805
Juliapixel (Juliapixel)

documentation

README

make_it_braille

crates.io Documentation

this crate provides methods to create, manipulate and output images made out of unicode braille characters such as .

Basic Usage

use image::imageops::FilterType;
use make_it_braille::{BrailleImg, dithering::Sierra2Row};

let mut img = image::open("image.png").unwrap();
img = img.resize_exact(64, 64, FilterType::Triangle);

let mut img = BrailleImg::from_image(img, Sierra2Row, false);

println!("{}", img.as_str(true, true));

Executable

makes things braille

install with cargo install -F bin --locked --git "https://github.com/Juliapixel/make_it_braille.git"

do make_it_braille -h to get a short help

Example

make_it_braille --width 80 "https://upload.wikimedia.org/wikipedia/en/9/9a/Trollface_non-free.png"

⠁⠁⠁⠁⠁⠁⠁⠁⠁⣀⣠⣠⣄⣤⣠⣄⠤⣠⣀⡄⣠⣀⣀⣀⣀⣀⣀⡀⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁
⠁⠁⠁⠁⠁⠁⠁⣰⣾⣿⣿⠿⣋⡭⢶⣚⣻⣭⣭⣯⣽⣙⣛⣳⠷⣾⢖⣟⣳⣺⣖⣶⣤⣄⠁⠁⠁⠁⠁⠁
⠁⠁⠁⠁⠁⢀⣾⣿⣿⣫⡵⣻⢕⣫⣽⣶⣷⣶⣶⣦⡻⣿⣿⣿⣿⣿⢭⣭⣭⣭⣭⡛⢿⣿⣿⣦⠁⠁⠁⠁
⠁⠁⠁⠁⢀⣾⣿⣿⣿⣿⣾⣵⠟⠛⠉⠉⠉⡙⠛⠿⣿⣿⣿⣿⢿⣿⣸⣿⠿⠿⢿⣿⣾⣿⣿⣿⡄⠁⠁⠁
⠁⠁⢀⢤⣨⣏⠿⡻⣿⣈⢿⣁⢐⣀⣀⣀⣀⠛⠻⠦⠁⣻⣷⣿⠛⠛⠉⠁⠁⣀⣀⣀⣹⣕⣋⣛⣛⢦⡀⠁
⠁⣰⢵⡿⢁⣤⣶⢤⣤⣉⠙⠛⠛⠋⣁⣴⣿⣿⣷⣦⣾⣿⣿⣿⣿⡆⢰⣿⣿⣿⠿⡿⠟⠛⠛⠛⢭⢳⡝⠁
⠰⣟⢿⠁⡾⠟⠃⢀⡉⠛⠿⣿⣿⣿⡿⢿⠿⠟⡟⠛⢛⣿⡿⣿⣿⣷⣄⠙⠻⣿⣦⣤⣤⡟⢻⣿⣾⢫⡏⠁
⠁⢻⡹⣇⢹⣶⣦⠘⠿⣷⣦⡀⣈⡉⠛⠻⠿⣿⡄⢻⣍⣁⣉⣿⡯⡿⠟⢀⣤⣬⣝⣻⡿⠃⠁⢹⣗⣫⠆⠁
⠁⠁⠙⢺⣽⣿⣿⣦⠁⢄⡉⠁⠘⠿⢿⣶⣦⠄⣈⣉⡙⠛⠛⠻⠶⠤⠶⠿⠛⠛⠋⣁⡀⢤⠁⢸⣿⡇⠁⠁
⠁⠁⠁⠁⠻⣿⣿⣿⣷⡌⠻⠇⣠⣤⣀⠈⠉⠁⠻⠿⠿⠿⠆⢸⡶⡶⠁⠶⠿⠷⠁⠿⠁⠈⠁⢸⣿⡅⠁⠁
⠁⠁⠁⠁⠁⠹⣿⣿⣿⣿⣦⣄⠛⢿⣿⣿⠃⣰⣤⣄⣀⡀⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⢸⣿⡆⠁⠁
⠁⠁⠁⠁⠁⠁⠈⠻⡿⠿⣿⠻⣷⣤⣈⠋⠠⢿⣿⣿⣿⡇⢸⣿⣾⡆⢰⣶⠆⢠⡶⢀⣎⠐⢠⣿⣿⠇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠈⠓⠮⣟⡲⢯⣝⡻⢶⣦⣤⣤⣉⣀⣈⣉⣙⣀⣘⣉⣀⣉⣠⣤⣤⣾⣿⣿⣿⡇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠉⠓⠺⢭⣗⣮⠭⡝⣛⢿⠻⠿⠯⠿⠽⠿⠿⠿⢿⣛⣭⣶⡿⢋⣿⡇⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠈⠙⠻⠿⣷⣾⣿⣽⣯⣿⣻⣻⣻⣻⣻⣽⣭⣵⣾⣿⣿⠃⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠈⠉⠉⠛⠛⠿⠿⠿⡿⢿⢿⡻⡿⠛⠋⠁⠁⠁⠁
⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁⠁

note: also works with local files

Commit count: 0

cargo fmt