python library and cli tool to convert images and videos to ascii.
Project description
asciipy
python library and cli tool to convert images and videos to ascii
Example output:
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 ofyt-dlp
asciipy-any[full]
will installrequests
andyt-dlp
to enable downloading from urls and youtube videos.asciipy-any[url]
will installrequests
to enable downloading from urls.asciipy-any[youtube]
will installyt-dlp
to enable downloading youtube videos.
Python usage:
- you can find our documentation here: https://asciipy-any.readthedocs.io/
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)
TODO:
- add proper examples to the repo and the docs.
- document 'hacky' things like overriding internal methods for more complex behavior.
need help?
-
or my guilded server (i'm often not online here)
Project details
Release history Release notifications | RSS feed
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.2.1.tar.gz
(23.3 kB
view hashes)
Built Distribution
Close
Hashes for asciipy_any-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f19eb91d64095629d01bba6ef965947f05afe14f508d0c6b13f0526812077927 |
|
MD5 | 4727675b28a7dfa97d500e93a57b5419 |
|
BLAKE2b-256 | 5f92ca88b0114e606797a7fe8ad85c4c3362ed7759aa51b68744a0f0ffb090af |