Skip to main content

A python package for making ascii art

Project description

Ascii_py

A python package for making ascii art

Installation

Run the following to install:

$ pip install ascii-python

Usage

Python Script

Import the ascii_py package, and you're done.

import ascii_py
  • See more in the Docs section

Terminal

$ Coming Soon

Developing Ascii_py

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]

Docs

Import the package

import ascii_py

asciiImage class :

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", "%", "?", "*", "+", ";", ":", ",", "."]
'''

asciiImage.img2ascii

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)

Coming Soon :

  • asciiImage

    • img2asciiImg (returns an image)
    • ascii2img
  • asciiVideo

  • Terminal usage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ascii-python-0.1.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

ascii_python-0.1.0-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page