Skip to main content

python library and cli tool to convert images and videos to ascii.

Project description

Documentation Status pypi version Discord

asciipy

python library and cli tool to convert images and videos to ascii

Example output:

image example gif example

additional examples can be found in /examples/

Command line usage:

asciipy [input_file] [output_file] [width] (optional, default=80)

Command line examples:

  • image with default size: asciipy test.png ascii.png

  • video with default size: asciipy test.mp4 ascii.mp4

  • image with custom size: asciipy test.png ascii.png 160

  • video with custom size: asciipy test.mp4 ascii.mp4 160

Optional dependencies (URL and Youtube support):

  • note: these libraries can be manually installed instead. youtube_dl can be used instead of yt-dlp
  • asciipy-any[full] will install requests and yt-dlp to enable downloading from urls and youtube videos.
  • asciipy-any[url] will install requests to enable downloading from urls.
  • asciipy-any[youtube] will install yt-dlp to enable downloading youtube videos.

Python usage:

Python examples:

image to ascii cli

from asciipy import ImageConverter
import sys

img = ImageConverter()
img.convert(sys.argv[1], './ascii.png')
print(f"{sys.argv[1]} converted and written to ./ascii.png")

Planned features:

  • proper gif support (mostly done, but still to buggy to be considered finished)
  • ability to write output as html
  • ability to convert vectors (not sure how i could even go about this)

need help?

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

asciipy-any-0.3.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

asciipy_any-0.3.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file asciipy-any-0.3.0.tar.gz.

File metadata

  • Download URL: asciipy-any-0.3.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.7

File hashes

Hashes for asciipy-any-0.3.0.tar.gz
Algorithm Hash digest
SHA256 14295bc4ee3a6e90742b00a23c53531bd46009d854b12570243f79e674effe45
MD5 f0afe42c8d98f668e2ebc8652517f1fc
BLAKE2b-256 d43e16ff4e3e0f6f0e596de9f4cb3e576734b3c1af7dffce377570e7a3af62ae

See more details on using hashes here.

File details

Details for the file asciipy_any-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: asciipy_any-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.7

File hashes

Hashes for asciipy_any-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d4db58956cc7597731ac6292dbc0b074ab383d794937381685ab612e852829
MD5 bd6559aa5b862d1843d330342ee5a16a
BLAKE2b-256 d0d80e01eda1b10e01ac9eaea87cf6af5c4374a57eeabe01d1889017e70f1dc4

See more details on using hashes here.

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