toot
toot copied to clipboard
Time to move the images branch to master?
With my latest updates, the images branch is working well with block graphics, kitty and iterm graphics. block is the default, if you want kitty or iterm you select at the command line like so: toot tui -f kitty
Image support is an installable option [images]
the same way that [richtext]
is. It brings in Pillow and term-image dependencies if selected.
All the image code is in tui/images.py
and conditionally loads depending on library availabilty.
If you run without image support, everything looks and works much the same as the master branch. ~, with the exception that the author header block in a toot is indented a bit. This can be changed if desired, but I think it looks OK this way. Your call.~
Images branch is up to date with master branch as of now.
I
Thanks, I'll check it out.
Looking forward to this!!
I tested it, it works great, thanks @danschwarz
git clone [email protected]:ihabunek/toot.git
cd toot
pip install --editable .
pip install pillow term_image
git switch images
python -m toot tui -f iterm
- macOS 14.3.1
- WezTerm 20240203-110809-5046fc22
- Python 3.12
Same on Fedora (AsahiLinux no less). Ran fine.
Given the emphasis on the tooi front end now, perhaps it'd be best to make the images branch an independent fork of the toot tui in its own right.
image support now merged into master - thanks @ihabunek
Do you have urwidgets library installed? All these dependencies are part of
the optional [images] section of pyproject.toml
so can be automatically
installed if you specify that at toot install time,
If you have all the dependencies and you’re launching with toot tui -f kitty
then it should work. If not, are you running in a terminal
multiplexer like tmux or screen? Those don’t play nice with kitty graphics
in most cases.
On Sun, Apr 28, 2024 at 4:40 PM Carl Davis @.***> wrote:
Is there any dependency/trick for viewing images with kitty under Linux? I've tried --debug and don't see any output that helps me identify why it isn't displaying images.
I'm running toot v0.43.0, kitty 0.33.1, and installed the following two packages based on @AbeEstrada https://github.com/AbeEstrada's post:
extra/python-pillow 10.3.0-2 (814.2 KiB 4.0 MiB) Python Imaging Library (PIL) fork aur/termimage 1.2.1-1 (+0 0.00) Display images in your terminal
— Reply to this email directly, view it on GitHub https://github.com/ihabunek/toot/issues/468#issuecomment-2081647347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAY4FJRKZGPFEEJU722M4O3Y7VND3AVCNFSM6AAAAABCCVMYI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGY2DOMZUG4 . You are receiving this because you modified the open/close state.Message ID: @.***>
I was not using the correct term_image dependency. Everything is working as expected now, thanks!
What was the correct term_image dependency? I'm also on Arch, the package in the extra repo doesn't list any optional dependencies for image support so I'm not sure if I absolutely have to use pip to handle this one dependency or if there's already a package I'm overlooking that handles this.
What was the correct term_image dependency? I'm also on Arch, the package in the extra repo doesn't list any optional dependencies for image support so I'm not sure if I absolutely have to use pip to handle this one dependency or if there's already a package I'm overlooking that handles this.
Term-Image 0.7.2 is the one you want. Urwidgets 0.2.0 also.
Term-Image 0.7.2 is the one you want. Urwidgets 0.2.0 also.
I see that, but neither are the names of any Arch packages, hence my asking whether those are actually available in an Arch package or if I must install those via pip (which pip discourages in favor of using pacman).
Sorry, I don't run arch, so can't advise you there. Term-image 0.7.2 was just released, so unlikely to have been packaged by any downstreams unless the packagers have some automated process in place (they may, for all I know.) Pip is what I use; all the dependencies are there.