Show images directly on terminal using Xterm colors.
Project description
Img2sh
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.
Demo
Testing the package is super easy. Install and run.
pip install img2sh --user
img2sh demo.jpeg
Result:
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
Installing
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
Development
Setup development environment
Conda is using for environment management.
conda create -n img2sh python=3.8
Following command should be executed to create interactive shell in this conda environment.
conda activate img2sh
Development
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.
Deployment
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/*
Licence
MIT
Acknowledges
This package is developed using:
Contributors
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
Built Distribution
File details
Details for the file img2sh-0.2.1.tar.gz
.
File metadata
- Download URL: img2sh-0.2.1.tar.gz
- Upload date:
- Size: 293.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7ad31ecb968024a5f70473ac15ce1d055f209b1765d4c2472b03cfe2b381e1a |
|
MD5 | cf681d1a8b1806ba73dd01b361a4c8a2 |
|
BLAKE2b-256 | 3161d086d8d1c94a55d3a12f11fb42653b0478ab958be8fd8433716a4e56a3b9 |
File details
Details for the file img2sh-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: img2sh-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f4a94424f49fac130f4a2a2af8eb6c1d7f0af9e2b91039d40d5a4f9979e3b00 |
|
MD5 | 7d1924aee153f49a505151a7b8c01046 |
|
BLAKE2b-256 | 55ab4484e7fe7de9a7ea1512108fe6a687ae8d9498bc8ddd07f8ef4d26481794 |