Skip to content

Instantly share code, notes, and snippets.

@Cryptizism
Created September 13, 2025 16:15
Show Gist options
  • Save Cryptizism/e8c2d5f27b75f1bf0a29fc1c6dc190e4 to your computer and use it in GitHub Desktop.
Save Cryptizism/e8c2d5f27b75f1bf0a29fc1c6dc190e4 to your computer and use it in GitHub Desktop.
import os
text = """
⠀⠀⠀⢸⣦⡀⠀⠀⠀⠀⢀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢸⣏⠻⣶⣤⡶⢾⡿⠁⠀⢠⣄⡀⢀⣴⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣀⣼⠷⠀⠀⠁⢀⣿⠃⠀⠀⢀⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠴⣾⣯⣅⣀⠀⠀⠀⠈⢻⣦⡀⠒⠻⠿⣿⡿⠿⠓⠂⠀⠀⢀⡇⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠉⢻⡇⣤⣾⣿⣷⣿⣿⣤⠀⠀⣿⠁⠀⠀⠀⢀⣴⣿⣿⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠸⣿⡿⠏⠀⢀⠀⠀⠿⣶⣤⣤⣤⣄⣀⣴⣿⡿⢻⣿⡆⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠟⠁⠀⢀⣼⠀⠀⠀⠹⣿⣟⠿⠿⠿⡿⠋⠀⠘⣿⣇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢳⣶⣶⣿⣿⣇⣀⠀⠀⠙⣿⣆⠀⠀⠀⠀⠀⠀⠛⠿⣿⣦⣤⣀⠀⠀
⠀⠀⠀⠀⠀⠀⣹⣿⣿⣿⣿⠿⠋⠁⠀⣹⣿⠳⠀⠀⠀⠀⠀⠀⢀⣠⣽⣿⡿⠟⠃
⠀⠀⠀⠀⠀⢰⠿⠛⠻⢿⡇⠀⠀⠀⣰⣿⠏⠀⠀⢀⠀⠀⠀⣾⣿⠟⠋⠁⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠀⠀⣰⣿⣿⣾⣿⠿⢿⣷⣀⢀⣿⡇⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠉⠁⠀⠀⠀⠀⠙⢿⣿⣿⠇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀
"""
# Six-per-em space
half_space_char = '\u2006'
def braille_to_dots_custom(char):
cp = ord(char)
if 0x2800 <= cp <= 0x28FF:
bits = cp - 0x2800
dots = []
for row in range(4):
left_dot = (bits >> row) & 1
right_dot = (bits >> (row + 3)) & 1 if row < 3 else (bits >> 7) & 1
line = ('.' + half_space_char if left_dot else ' ') + (half_space_char + '.' if right_dot else ' ')
dots.append(line)
return dots
else:
return [' ', ' ', ' ', ' ']
lines = text.strip().split('\n')
row_groups = [[] for _ in range(4)]
for line in lines:
for char in line:
dot_block = braille_to_dots_custom(char)
for i in range(4):
row_groups[i].append(dot_block[i])
for i in range(4):
row_groups[i].append('\n')
os.makedirs("chunks", exist_ok=True)
for i, group in enumerate(row_groups):
with open(f"chunks/chunk_{i}.txt", "w", encoding="utf-8") as f:
f.write(''.join(group))

How to Use

  1. Replace text with the braille ascii art you want to convert
  2. Paste each chunk in and shift down sligtly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment