Skip to content

rr-/brailleimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brailleimg

Convert images to silly text using braillecode. Supports dithering, dark-on-light and light-on-dark terminals and allows to adjust output brightness.

Usage:

$ brailleimg <FILE>

Installation:

git clone https://github.com/rr-/brailleimg.git
cd brailleimg
python3 -m pip install --user .

Examples

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠤⠤⠤⠴⠤⠦⠴⠤⠤⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠊⢉⠰⡀⢎⠰⡁⠎⡐⢂⠒⡌⠒⡄⠢⢌⡙⠒⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠔⠊⠁⠀⠀⠀⠀⠆⠱⡈⠔⡈⢆⠱⡈⢒⡈⢅⠢⡑⠢⡐⠩⠄⡌⠓⣄⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⠈⠀⠀⠀⢀⡀⠤⠤⠒⠊⠓⠉⠚⠑⠊⠲⠥⢦⡘⣄⠢⢡⠑⡨⠑⡌⠰⠡⠌⠳⣄⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢒⣉⡀⠄⠤⠄⠒⠂⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⢧⢢⡑⢄⠣⠌⣁⠣⢌⡑⢌⠳⡀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢎⠦⡘⠰⣀⠃⠆⢌⠢⢍⠽⣄⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢣⣅⠣⢄⠩⡘⢄⠊⡜⢲⡘⣆⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠖⡈⢆⠡⠌⡒⢌⡣⢜⡸⡆⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⡧⢘⠠⢃⠜⡐⢪⡑⢎⡔⣣⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡷⢁⠎⡰⢈⠔⣣⠙⣆⠎⣵⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡠⠤⠔⣂⠒⡒⠒⡒⠒⡒⠢⠤⢄⣀⠀⠀⠀⠀⠀⠀⢸⡑⢊⠔⡠⢃⠞⡤⢋⡴⢩⢼⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠔⡒⢩⠐⡄⢣⠘⡠⢑⠨⡑⢄⠣⠌⡑⢌⠢⢄⡉⠖⠢⣄⠀⢠⠧⡙⢄⠊⡔⡡⠞⣌⢣⠜⣡⠞⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠤⢒⠡⢂⠱⡈⢆⠡⡘⢄⠱⣀⠃⢆⠡⢊⠄⢣⠘⡄⢊⠔⡨⠌⡡⢄⡙⠣⣗⠈⢆⠱⡰⣉⠞⡤⢓⠎⣥⠇⠀ ⠀⠀⠀⠀⠀⠀⣠⠤⠆⠴⢠⡀⣀⠤⢒⠒⡊⢍⠋⡍⣉⠓⠲⠵⣌⣆⡡⣪⠴⢒⠛⠦⣕⡨⠘⠤⢡⠘⡄⢊⠔⡨⢐⠢⠌⡡⢌⠻⣤⠣⡕⢪⠜⡲⣉⠞⡸⠀⠀ ⠀⠀⠀⠀⢀⠞⡀⢆⡉⢦⠵⡉⠔⡈⢆⠱⢈⠢⡑⠰⢠⠉⢆⠡⢄⢂⡟⢀⠆⣥⣚⣴⣠⠙⢮⡐⢡⠒⡈⢆⡘⠄⣃⠢⡑⠰⣈⠳⣘⢧⡙⣆⠫⠴⡑⢮⠃⠀⠀ ⠀⠀⠀⠀⢸⢠⡑⢦⡝⢃⠰⡈⢆⠱⢈⠢⡁⢆⠡⢃⠆⣉⠢⢑⠨⡘⠆⡱⡞⡁⢆⠠⡙⢌⢺⡅⢢⠘⡐⠢⠌⢒⠠⡑⢨⠑⣌⠳⡌⢎⢷⡌⣣⠝⣌⠏⠀⠀⠀ ⠀⠀⠀⠀⠈⢣⡼⠋⠘⡆⠱⡐⠌⢢⠁⢆⠱⡈⡦⠓⠚⠐⠓⠪⣔⠁⠎⡄⢳⡈⢄⠣⢌⡜⡾⢀⠣⡘⢄⠣⡘⢄⠣⠘⢤⡙⢤⡓⢬⢃⡎⢷⢢⣙⠎⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢀⠃⠴⠀⡎⢡⠂⡍⢂⠍⡐⢢⡙⠀⠀⠀⣀⠀⠀⠀⢫⠐⡌⢢⠙⡦⠽⡖⣏⠰⡈⠔⡡⢂⠆⡡⢊⠔⡩⢆⡙⢦⡙⢆⡣⢜⡹⡦⠋⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣎⠤⠐⠒⠉⠉⠉⠉⠉⠈⠙⠒⠣⢄⡀⠀⠀⠀⠀⠀⢸⠁⢆⠡⢊⡜⡱⠸⢼⡂⠱⡈⠔⢢⡘⢤⢣⠚⡥⢋⡜⢢⡙⢦⡙⢦⡑⡇⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⠔⠊⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠑⠂⠤⣀⢀⠎⡘⢄⢃⠲⣌⠱⣋⠼⣅⠣⡜⣌⢣⠜⣡⠎⣕⢪⢱⠸⡡⠞⡤⡙⢦⡑⣳⠀⠀⠀⠀⠀⠀ ⠀⡠⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠚⢴⢈⠢⡱⢌⠳⣌⠚⡥⢓⡜⢤⠓⣎⠱⣊⢆⠳⣌⠣⠵⣹⠐⡍⢦⣑⢺⠀⠀⠀⠀⠀⠀ ⠀⡇⠀⠀⠀⠲⠀⠀⠀⠀⠰⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠌⣇⢎⡱⢊⠱⡈⠱⣈⠱⡸⢌⠳⣌⠳⡌⢎⡱⢌⡣⣝⠣⢘⡘⠦⡜⢬⠃⠀⠀⠀⠀⠀ ⠀⠑⣄⠀⢀⣀⣠⠤⢤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣄⡀⠠⢐⡏⢦⠱⡈⢆⠡⢃⠄⡃⠜⣌⠳⣬⠓⣌⠇⣎⡱⣲⢋⠰⡁⢌⠳⣌⣹⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠉⢃⡸⠈⣧⣼⣿⢉⡛⢒⡓⠶⠴⢢⡔⢦⠞⡚⣭⠞⠀⠈⢀⡾⡘⢦⡑⠌⡄⠣⠌⣂⠱⡈⢔⢣⢺⡍⢦⡙⣤⢟⡡⢎⡔⡈⠆⢳⡐⡮⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⢰⡛⣿⣿⡠⠜⢢⠘⡄⢣⢑⡘⢣⢎⡵⠃⠀⢀⡴⢫⡔⡍⢦⡙⡔⢨⢁⠒⠤⢡⠘⠌⢦⢣⣏⠖⠋⠀⠈⠳⣌⠲⣡⠞⠂⠛⡅⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⡏⢣⡀⠙⠛⠼⠦⡱⠜⠦⠧⠞⠋⠁⠀⣀⡴⢫⠜⣡⠚⡜⢢⠻⣌⢣⢌⡘⠄⡃⠜⡈⠶⣡⠆⠀⠀⠀⠀⠀⠈⠳⠇⠤⠐⠊⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠖⠉⠉⢙⠦⢄⡀⠀⠀⠀⠀⠀⢀⣀⡴⠚⠉⠉⠁⠋⠁⠋⠉⠉⠉⠉⠓⢮⣐⢣⠘⣤⣁⠳⣌⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠈⠉⠈⠉⠀⠀⠀⠈⠉⠁⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠦⣛⠀⠀⠉⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠒⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀𜺠𜴉𜴀𜵲🮂𜴲𜴳𜴜𜶻𜺣⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀𜴃𜺨𜺣𜺣𜵼𜶭𜺣⠀𜺨𜴆𜶫𜶿⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀𜴽⠀▗⠀𜵑𜴃𜺨𜺫⠀𜴃𜴆𜴝𜴅▖⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀▗𜺨𜺠𜷀𜵟𜺨𜶷𜷏𜴉⠀⠀▂▂▙▘⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀𜺣𜺠𜵑▘⠀𜴁▝𜴍𜺫🮅𜴏⠀⠀𜶖█𜴫𜵊⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀🯧𜷠𜵢⠀⠀⠀𜺫𜴞▖⠀⠀⠀⠀𜴘𜺫𜺨𜵐𜴍⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀𜴘𜶐⠀⠀⠀⠀⠀𜺠𜵊𜺠𜺣𜶭𜴆⠀𜺠𜴋⠀𜵲𜶓⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀𜴘𜷀𜺠𜴉𜴈𜶮𜶸𜶪𜶻𜶠𜶮𜴆▄𜴀⠀⠀𜺣▐𜵰⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀𜴵𜵊𜴘𜴀𜶮𜴋▀▌⠀𜵂𜴥𜵮𜵂𜶙𜴳𜶻𜴂⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀𜵅𜵑𜴁⠀▖⠀▌⠀▚𜶈𜴦𜴹𜶞𜷤𜺣𜵒⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀𜶚▙▝⠀𜵱⠀𜵷⠀⠀𜴢𜵒𜴶𜴁𜺠▌▌𜵈⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀𜺫𜵇𜴜𜶴𜷋𜴰▝🮂▌𜶖𜶻▚𜶿𜵫⠀𜶖▌⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀𜶖⠀⠀⠀⠀⠀⠀𜺫𜴁⠀𜴅𜶫⠀⠀▐▗⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀𜵵⠀⠀⠀⠀⠀⠀⠀⠀𜴄⠀⠀⠀𜵈▐⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀▐⠀⠀⠀⠀⠀⠀⠀⠀𜶜𜵈⠀𜶖⠀⠀𜵈⠀⠀⠀⠀⠀⠀

Changelog:

0.2:

  • Added Otsu and Median threshold algorithms
  • Added full blocks output method
  • Fixed ghost borders when aspect ratio calculations resulted in extra rows or columns
  • Fixed aspect ratio calculation
  • Switched to UV for package managing
  • Switched to Pillow for image processing (reduced binary size)
  • Switched to argparse for CLI handling

0.1:

  • Initial version

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages