darrenburns / rich-pixels Goto Github PK
View Code? Open in Web Editor NEWA Rich-compatible library for writing pixel images and ASCII art to the terminal.
License: MIT License
A Rich-compatible library for writing pixel images and ASCII art to the terminal.
License: MIT License
I would like to see a rich-pixel version of the standard library .format() which would allow users to do something like this:
There may additionally need to be a function that tells rich-pixels what color is going to be used for string replacement
i.e)
my_image = example.png
image.set_format('pink')
render.image(my_image).format(ip_address01, ip_address02)
Which would take this image and fill in two IP addresses with the format of 000.000.000.000
If I try a poetry add rich-pixels
I get the following dependency conflict:
❯ poetry add rich-pixels
Using version ^2.0.0 for rich-pixels
Updating dependencies
Resolving dependencies... (0.1s)
Because no versions of rich-pixels match >2.0.0,<3.0.0
and rich-pixels (2.0.0) depends on rich (>=12.0.0,<13.0.0), rich-pixels (>=2.0.0,<3.0.0) requires rich (>=12.0.0,<13.0.0).
And because no versions of rich match >12.6.0,<13.0.0, rich-pixels (>=2.0.0,<3.0.0) requires rich (>=12.0.0,<=12.6.0).
And because textual (0.9.1) depends on rich (>12.6.0)
and no versions of textual match >0.9.1,<0.10.0, rich-pixels (>=2.0.0,<3.0.0) is incompatible with textual (>=0.9.1,<0.10.0).
So, because transitions depends on both textual (^0.9.1) and rich-pixels (^2.0.0), version solving failed.
Hello,
I tried to use rich-pixels to print a png file on the Powershell console of Windows 11 but I got a white screen only. I can use a Rust utility viu to print it well.
`
from rich_pixels import Pixels
from rich.console import Console
console = Console()
pixels = Pixels.from_image_path("file.png")
console.print(pixels)
`
❯ pip show rich-pixels
Name: rich-pixels
Version: 3.0.0
Summary: A Rich-compatible library for writing pixel images and ASCII art to the terminal.
Home-page:
Author:
Author-email: Darren Burns <[email protected]>
License:
Location: venv\Lib\site-packages
Requires: pillow, rich
Required-by:
❯ py -c "import pygame"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pygame'
installed via pip install rich-pixels, 2.2.0 works perfectly
It would be nice to have a license for this package
Hey, first of all great implementation. Due to the lack of data "sample_files" directory, tests are failing. Could you provide the files? Hoping to extend the implementation and need the image files to ensure there is no breakage
Hi, really like your package!
Was wondering if you'd be interested in extending support to 3.7?
I'd like to use rich-pixels
for another project but I start support at 3.7, and I see that you start supporting at 3.8.
At a first glance, I think the main changes would be typing hints? And I could gladly take this up as well 🙃
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.