Skip to main content

CLI tool for turning images into ascii art.

Project description

ascii-dotter

Turn an image into "ASCII Art" using Braille Unicode characters.

Preamble

As I write this section of my README, it is 11/6/2021. I worked on this project initially almost four years ago, in 2018. It was the first project I was proud of. However, looking at it on my GitHub pinned now brings me a great amount of shame. I no longer like how I handled this program. I violated (albiet at the time, unknowlingly) many software engineering philosophies, and incidentally followed many design anti-patterns. I decided in a energy-drink fueled haze that I would rewrite the entire program, base-up, to the best of my current ability. After this, I hope to create something I can once again be proud of. Then again, in three years time, I might just rewrite it again.

Getting Started

Setup

You may install the project using python3 setup.py install or ./setup.py install.

Requirements

This project was built using Python 3.8.10. A terminal that supports unicode characters is recommended, but not required. Please see requirements.txt for module requirements.

Running

After installation, the program may be run directly by using asciidotter, or through the module using python3 -m AsciiDotter.

usage: asciidotter [-h] [--output OUTPUT] [--tolerance TOLERANCE] [--method METHOD] [--limit LIMIT] [--invert] input
    -h: Displays help message.
    --output, -o: Output text stream. Optional. Default is sys.stdout.
    --tolerance, -t: Float in range [0.0, 1.0]. Any pixel with a luminance value greater than or equal to this value will be plotted. Default is 0.5.
    --method, -m: Which method to use for determining the luminance value of a pixel. Luminance values are mapped to [0.0, 1.0]. Methods are as follows:
        "AVERAGE", "A": Calculate luminance by taking average of r, g, b.
        "RELATIVE", "R": Calculate luminance by using the [relative luminance](https://en.wikipedia.org/wiki/Relative_luminance) formula. Default.
        "VALUE", "V": Calculate luminance by calculating the value of the pixel in HSV space.
        "WEIGHTED", "W": Calculate luminance by summing the r, g, and b values weighted by their wavelengths.
    --limit, -l: Character limit. Optional. Defaults to 1,048,576.
    --invert, -i: Invert output image. Optional.
    input: Binary input stream of image. Required. 

Authors

  • Will Ciesialka

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE VERSION 3. See LICENSE for details.

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

AsciiDotter-2.1.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

AsciiDotter-2.1.0-py3.8.egg (30.8 kB view details)

Uploaded Egg

AsciiDotter-2.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file AsciiDotter-2.1.0.tar.gz.

File metadata

  • Download URL: AsciiDotter-2.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for AsciiDotter-2.1.0.tar.gz
Algorithm Hash digest
SHA256 2ded13cfdb4d14306e1915e36f68be6c5e6b83f170dbae931e7b1acc80ce33da
MD5 bda8c4969eff9bd04d1813adfac59778
BLAKE2b-256 8f61e83b93f48d1aa302009bac40844e771882fc45d201b1278b1043fbfa1df8

See more details on using hashes here.

File details

Details for the file AsciiDotter-2.1.0-py3.8.egg.

File metadata

  • Download URL: AsciiDotter-2.1.0-py3.8.egg
  • Upload date:
  • Size: 30.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for AsciiDotter-2.1.0-py3.8.egg
Algorithm Hash digest
SHA256 323f41adcf25dfb27b6ffb43c78e44b389e473e83383b918fb2bb7c8fc40a5cc
MD5 99c2ec0e5f58e954b3c971d617269d61
BLAKE2b-256 ce4a8bf066b65205627100f601c7744fef3500dde3a8960cc21d16fe3b5b3a96

See more details on using hashes here.

File details

Details for the file AsciiDotter-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: AsciiDotter-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for AsciiDotter-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b69ae7589e2680b728cb13c1b983382cca4804bff36a53aa0c6234c9091b1e88
MD5 67fc2ad4d4f9bb7fd906dccbf9dd82b4
BLAKE2b-256 bf9281705b738ef3f0765138c1b6306404e136c430670182ee08927c210f4356

See more details on using hashes here.

Supported by

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