-
Notifications
You must be signed in to change notification settings - Fork 281
w3m image preview #214
Comments
Assuming you merge the image branch I seen to the main, I'd love a reminder to add w3m to opt depends for aur package. (once a release is made ofc) |
Yea no problem! It will definitely be an optional setting that will be disabled by default. BTW do you want to add something to the README about installing on Arch? |
Made PR #215. Not entirely sure what level of detail to cover. Since aur packages arent the same as a "native" package. Feel free to poke at any of the wording. But I think it covers the basics. I'd be happy to change anything. |
Thanks! I moved a few words around to make it more concise but I tried to keep all of your information in there. |
I was planning around to uses |
Nice! Is there a flag to enable/disable the use of w3m? From |
I don't think a white or blacklist appraoch is ideal. Rather a feature toggled on/off. Some terminals work, some don't. But it's still a random thing. Ranger users would tell you that it's hit and miss but never set in stone. |
I use ranger and can confirm that. Although I had partial success with ascii view for images in gnome-terminal. For me urxvt, and xterm are capable of displaying images in the terminal. |
@michael-lazar how is going with w3m? I didn't found any environment variable that i could use to call the default image viewer of the user, so i'll set the |
@Ziul I'll admit that I haven't worked on this lately. It will probably be a while (until I get another burst of motivation) before the w3m stuff gets in. In the mean time, thanks for the PR. I'll go over it and try to get back to you with comments after Memorial Day. As for the default program, @masochist suggested using mailcap here (#78). I haven't tested it thoroughly but you can do something like this import tempfile
import mailcap
import mimetypes
url = 'http://i.imgur.com/RTMUoFo.png'
mimetype = mimetypes.guess_type(url)[0]
print mimetype
d = mailcap.getcaps()
m = mailcap.findmatch(d, mimetype, 'view', url)
print m[0] and for me it prints
|
Great! |
@michael-lazar Any ETA on when we can see the |
Is this dead? |
No, but there has been no significant work on it in a few years and no timeline to get it in pushed in at this point. Anyone is welcome to step in and work on updating the branch, but it would be significant work merging in master and fixing/testing all of the different browser edge cases. |
Hi there I'm glad I see this thread - sort of tho. It would be really amazing to have image previews because like a half of whole Reddit is image based content. People usually scan the list of threads by eyes pinned onto thumbnails and if they like what they see go onto the thread detail page. This missing feature is basically one and only thing which is blocking me (and I guess a lot of the others) from switching gtom browser to cli in terms of Reddit. Althought I already tried to help once with images for a CLI app but sadly got no feedback. From what I know so far (my investigation + info from ranger developer) images in terminal are not easy at all. But once basically any CLI app can solve this we can finally kick asses to those Electron memory-consuming and node-shit apps. |
Just gonna add to this, even though it seems like it may be dead. The kitty terminal supports viewing images natively, without using w3m. It would be wonderful if we could have support for multiple image rendering backends. Personally I prefer kitty, but it would only be available in the kitty terminal. |
I was poking around ranger's source code and there's an extension module (https://github.com/hut/ranger/blob/master/ranger/ext/img_display.py) that apparently makes this incredibly easy.
The text was updated successfully, but these errors were encountered: