Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mirukana/pixcat
CLI and Python 3.6+ API to display images on a kitty terminal with optional resizing.
https://github.com/mirukana/pixcat
api cli graphic icat image kitty picture python resize scale terminal
Last synced: 4 days ago
JSON representation
CLI and Python 3.6+ API to display images on a kitty terminal with optional resizing.
- Host: GitHub
- URL: https://github.com/mirukana/pixcat
- Owner: mirukana
- License: lgpl-3.0
- Created: 2018-10-01T09:14:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T05:30:36.000Z (12 months ago)
- Last Synced: 2024-10-30T11:42:07.918Z (14 days ago)
- Topics: api, cli, graphic, icat, image, kitty, picture, python, resize, scale, terminal
- Language: Python
- Size: 60.5 KB
- Stars: 45
- Watchers: 2
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# pixcat
[![PyPI downloads](http://pepy.tech/badge/pixcat)](
http://pepy.tech/project/pixcat)
[![PyPI version](https://img.shields.io/pypi/v/pixcat.svg)](
https://pypi.org/project/pixcat)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pixcat.svg)](
https://pypi.python.org/pypi/pixcat)**WORK IN PROGRESS**
Display images on a [kitty](https://sw.kovidgoyal.net/kitty/) terminal
with optional custom/thumbnail/fit-to-screen resizing.
Developed with the goal of being a more powerful alternative to `kitty icat`,
while also providing an usable Python 3.6+ API.## Usage
Basic CLI examples:
```sh
pixcat file.jpgpixcat fit-screen --enlarge /tmp/abc.jpg
pixcat thumbnail --size 128 --align left 'https://picsum.photos/480?random'
pixcat resize --min-width 1920 --min-height 1080 \
--max-width 1920 --max-height 1080 \
~/images/wallpapers 1.jpg 2.png
```The commands and options have short forms too.
See `pixcat --help` for more information.Same examples using the Python package (no documentation yet):
```python3
from pixcat import ImageImage("file.jpg").show()
Image("/tmp/abc.jpg").fit_screen(enlarge=True).show()
Image("https://picsum.photos/480?random").thumbnail(128).show(align="left")
for i in Image.factory("~/images/wallpapers", "1.jpg", "2.png"):
i.resize(1920, 1080, 1920, 1080).show()
```## Installation
Requires Python 3.6+, tested on GNU/Linux only.
```sh
pip3 install --upgrade pixcat
```