Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Tom DeCricle
Published © GPL3+

ASCII Art for your Terminal Console

Make color ASCII art with a python script in a Linux Terminal

BeginnerProtip30 minutes130
ASCII Art for your Terminal Console

Things used in this project

Hardware components

Raspberry Pi 5
Raspberry Pi 5
×1

Software apps and online services

python

Story

Read more

Schematics

Data Schematic

This is how the script interfaces with the system

Code

ascii_art.py

Python
Script for generating ascii art
from ascii_magic import AsciiArt
from PIL import ImageEnhance

#create an instance of AsciiArt called my_art and call on the from_image function
#loads a file named ImageForAscii.png
my_art = AsciiArt.from_image('ImageForAscii.png') #Update the filename to your jpg name

my_art.image = ImageEnhance.Brightness(my_art.image).enhance(1.0)

#print the ascii art to the terminal
my_art.to_terminal()

#-----Optional-----#
#convert the image to a high quality html file called ascii_art.html
my_art.to_html_file('ascii_art.html', columns=200, width_ratio=2)

Credits

Tom DeCricle
6 projects • 2 followers
Electrical Engineer with experience in Schematic Design, PCB Layout, PCB Fabrication & Assembly Procurement, Hardware/Firmware/Software Dev
Contact
Thanks to ascii_magic and ProfOak.

Comments

Please log in or sign up to comment.