- Saved searches
- Use saved searches to filter your results more quickly
- License
- Mikelarg/text-to-ascii-art
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- ASCII Art in Python with art library
- Example 7:
- Output:
- Example 8:
- Output:
- Conclusion
- Author: Harry
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Converts your text to ASCII art
License
Mikelarg/text-to-ascii-art
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This script converts your text to ASCII art
- Install pip, if you haven’t install it yet. (Click)
- Instal Pillow(pip install Pillow)
- All done
- -text TEXT Your text (Required)
- -char CHAR Your char for ASCII (Optional, default char — █)
- -space-char SPACE_CHAR Your space char (Optional, default space char — space¯)
- -gap-char GAP_CHAR Your char between letters (Optional, default space char — empty)
- -font FONT Your Font (Optional, default font — Arial)
- -align ALIGN Text Align(center, left, right) (Optional, default align — left)
- -spacing SPACING Text Spacing (Optional, default spacing — 0)
- -size SIZE Font Size (Optional, default size — 10)
- -signature SIGNATURE Your Signature. \n — for new line(Optional, default signature — mine)
- —left If argument is defined, script writes you signature left side
- —hr If argument is defined, script writes hr
- -hr-char HR_CHAR Your HR char(Optional, default char — ‘_’)
python text_to_ascii.py -text "Git Hub" -signature "" --hr -hr-char "#" #################################### ██ █ █ █ █ █ █ █ █ █ █ █ █ █ ███ █ █ █ █ ███ █ ███ █ █ █████ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ ██ █ ██ █ █ ███ ███ ####################################
python text_to_ascii.py -text "♥" -char "♥" -signature "" --hr -gap-char " " -font "Arial Unicode.ttf" -size 20 #You may not have this font ____________________________________________ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ♥ ____________________________________________
About
Converts your text to ASCII art
ASCII Art in Python with art library
We will be using the art library to make ASCII Art in Python. This is a very simple library and also called ASCII art library for Python. ASCII Art is also known as computer text art. It involves the Intelligently arrangement of special characters and characters you type to create visual shapes that span multiple lines of text.
Example 7:
from art import * tprint("copyassignment", font="random")
Output:
Example 8:
from art import * tprint("copyassignment", font="random")
Output:
Conclusion
In this post, we learned how to use Python’s art library to create ASCII Art in Python. We have used the tprint() function to print ASCII art. There are two main arguments(the text we want to print and the font of the text) that we can pass to the tprint() function.
We hope you find this article on “ASCII Art in Python” helpful.
- What is web development for beginners?
- Python | Check Armstrong Number using for loop
- Python | Factorial of a number using for loop
- What does if __name__ == __main__ do in Python?
- Python | CRUD operations in MongoDB
- Create your own ChatGPT with Python
- Radha Krishna using Python Turtle
- Python Programming Examples | Fundamental Programs in Python
- Python | Delete object of a class
- Python | Modify properties of objects
- Python classmethod
- Python | Create a class that takes 2 parameters, print both parameters
- Python | Create a class, create an object of the class, access, and print property value
- Python | Find the maximum element in a list using lambda and reduce()
- Python | filter numbers(that are not divisible by 3 and 4) from a list using lambda and filter()
- Python | lambda function that returns the maximum of 2 numbers
- Python | Convert all strings of a list to uppercase using lambda
- Python | Square numbers of a list using lambda
- Python | Reverse and convert a string to uppercase using lambda
- Python | Convert String to uppercase using lambda
- Python | Reverse a list using lambda
- Python | Calculator using lambda
- Python | Square of a number using lambda
- Python | Multiply numbers using lambda
- Python | lambda with None
- Python | lambda with pass statement
- Python | Add numbers using lambda
- Python | Print Namaste using lambda
- Iterate over a string in Python
- Python | join() | Join list of strings
Author: Harry
Hello friends, thanks for visiting my website. I am a Python programmer. I, with some other members, write blogs on this website based on Python and Programming. We are still in the growing phase that’s why the website design is not so good and there are many other things that need to be corrected in this website but I hope all these things will happen someday. But, till then we will not stop ourselves from uploading more amazing articles. If you want to join us or have any queries, you can mail me at admin@copyassignment.com Thank you