A python package for making ascii art
Run the following to install:
$ pip install ascii-python
Import the ascii_py package, and you're done.
import ascii_py
- See more in the Docs section
$ Coming Soon
To install ascii_py, along with the tools you need to develop and run tests, run the following in your virtualenv:
$ pip install -e .[dev]
Import the package
import ascii_py
The responsible class for converting ( img <-> ascii )
ai = ascii_py.asciiImage(chars)
# ^-- Optional
'''
Chars is a list of strings used in converting images to ascii
orderd from brightest to lowest pixel values:
Default: ["@", "#", "S", "%", "?", "*", "+", ";", ":", ",", "."]
'''
converts an image to ascii text
asciiImg = ai.img2ascii(path, width=150)
# ^--Optional
'''
path : (str) The path to the image to be converted
width : (int) the new width of the eimage after being converted
'''
print(asciiImg) # <-- Returns (str)
-
asciiImage
- img2asciiImg (returns an image)
- ascii2img
-
asciiVideo
-
Terminal usage