Show images directly on terminal using Xterm colors.
Img2sh is a tool to show images directly on terminal. For color images 256 xterm color support is required. This script basically resize the image with antialliasing and quantized its colors to xterm color pallette.
Testing the package is super easy. Install and run.
pip install img2sh --user img2sh demo.jpeg
Demo with interactive mode
img2sh demo.jpeg -w 80 -i q: quit z: zoom+ x: zoom- c: reset arrow keys for navigation cmd: q
For detailed usage arguments:
$ python img2sh/cli.py --help usage: cli.py [-h] [-w WIDTH] [-i] Image Show images directly on terminal. positional arguments: Image the directory of the image which will be opened optional arguments: -h, --help show this help message and exit -w WIDTH, --width WIDTH image width on the terminal -i, --interactive open image in interactive mode
It can be easily install using pip.
pip install img2sh --user
Installing from source:
git clone https://github.com/mozanunal/img2sh cd img2sh pip install -r requirements.txt python setup.py install
Setup development environment
Pipenv is using for environment management.
pipenv install --dev
Following command should be executed to create interactive shell in this pipenv.
In this repo issue based development is active. For any problems or new enhancements please open a issue.
Autopep8 is used for formatting. Pylint is used for linting.
The following 2 commands are required to deploy over pypi.
python setup.py sdist bdist_wheel twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
This package is developed using:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size img2sh-0.1.8-py2-none-any.whl (7.1 kB)||File type Wheel||Python version py2||Upload date||Hashes View hashes|
|Filename, size img2sh-0.1.8.tar.gz (5.7 kB)||File type Source||Python version None||Upload date||Hashes View hashes|