I'm not sure this is the right community.

I've been hoping for a TUI frontend for Lemmy for a while, but unfortunately none came out and I've decided to build a proof of concept on my own.

It's written in python with pythorhead, blessed and chafa.py and it's quite janky.

you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 2 years ago (2 children)

For rendering high quality images in the terminal, check out the Kitty graphical protocol. I don't know if they are any python libraries to use, but I think that they are. P.S. This seems to work well https://stackoverflow.com/questions/58138638/how-to-display-graphical-images-in-kitty-terminal-using-python

  • source
  • hideshow 4 child comments
  • [–] [S] 6 points 2 years ago (1 child)

    I went with chafa as it's terminal agnostic and supports various modes.

    Then again, I'm not really sure a tui frontend needs high quality image rendering. Earlier I even considered going completely 1bit braille or just ASCII just so that the image doesn't take all of the focus at the expense of the post body.

    As mentioned by another commenter, I believe opening the full image in an external viewer is a much better solution, not to mention easier to implement.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    You could also look into using sixel. It's kinda like the kitty protocol but older and terminal agnostic.

    https://en.m.wikipedia.org/wiki/Sixel

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    does this protocol work for other terminals? such as alacritty, foot, urxvt, or even st (with appropriate patch ofc)?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 2 years ago

    A quick research tells me that there aren't patches for other emulators, but the protocol seems well described, so making those patches is possible. I could also take a look at Alacritty source code and deicide if I could make this project work.

  • source
  • parent