266

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.

all 39 comments
sorted by: hot top controversial new old
[-] circuitfarmer@lemmy.sdf.org 26 points 6 months ago

I love this. Anything that keeps me in the terminal and out of the browser is a blessing from Tux himself.

[-] Secret300@sh.itjust.works 18 points 6 months ago

Finally a Lemmy client for Linux mobile

[-] crunchpaste@lemmy.dbzer0.com 5 points 6 months ago

That made me laugh so hard. Are there really no clients for linux mobiles?

[-] Secret300@sh.itjust.works 2 points 6 months ago

There wasn't a few months back when I checked

[-] LainOfTheWired@lemy.lol 17 points 6 months ago

That looks epic!

Please add the ability to view images with an external image viewer as I find a lot of social TUI apps seem to lack that.

Add that and you're making my ideal Lemmy client

[-] crunchpaste@lemmy.dbzer0.com 10 points 6 months ago

Thank you, that's so kind! I'll probably try to tackle the comments first as they come quite messy from the api, then I'll probably give the images a go.

To be honest, I'm hoping this project doesn't get out of my league too quickly as a have almost no experience with working with apis.

[-] KiranWells@pawb.social 7 points 6 months ago

You might look into displaying images in the terminal as well; many modern terminals support showing actual images natively

[-] wim@lemmy.sdf.org 13 points 6 months ago

Have you considered supporting Sixel for images?

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

[-] shartworx@sh.itjust.works 11 points 6 months ago

Have you looked at Textual? It probably has more functionality than blessed.

[-] crunchpaste@lemmy.dbzer0.com 4 points 6 months ago

I did, but i was going for something really small and simple, more like an ebook reader than a webui.

[-] bloopernova@programming.dev 2 points 6 months ago

+1 for Textual. It's great stuff!

[-] krash@lemmy.ml 2 points 6 months ago

Textual is great, and the community at discord is very helpful and welcoming.

[-] djtech@lemmy.world 9 points 6 months ago

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

[-] crunchpaste@lemmy.dbzer0.com 6 points 6 months ago

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.

[-] jodanlime@midwest.social 3 points 6 months ago

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

[-] crunchpaste@lemmy.dbzer0.com 2 points 6 months ago

Thanks, I've only heard of sixel, but never really read into it. Sounds promising.

[-] kariboka@bolha.forum 1 points 6 months ago

A suggestion is do it like neofetch and let the user choose. Amazing work.

[-] callyral@pawb.social 3 points 6 months ago

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

[-] djtech@lemmy.world 2 points 6 months 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.

[-] itsaj26744@programming.dev 7 points 6 months ago

There is one named neonmodem overdrive but it is buggy. It also support discourse forums any plan for this?

[-] crunchpaste@lemmy.dbzer0.com 3 points 6 months ago

There is one named neonmodem overdrive but it is buggy.

It really is buggy, iirc I couldn't even get it to run properly.

It also support discourse forums any plan for this?

I really don't have any plans (or even a name) for the app, as I've just started playing around with pythorhead yesterday. I just hoped posting a prototype or a proof of concept might spark a discussion and maybe inspire someone much more competent than me.

[-] itsaj26744@programming.dev 2 points 6 months ago

Fine I thought u were somewhere.🥲

[-] Truck_kun@beehaw.org 6 points 6 months ago

I would not recommend working on two GUI's at once, but if you build it in a way you can use different frameworks for it, the maker of Rich also makes a nice TUI framework API called Textual.

Here's some projects made with it for a sample of what it's usage can look like: https://www.textualize.io/projects/

I believe it does not use curses at all.

[-] wwwgem@lemmy.ml 6 points 6 months ago

Wish someone would come with something like tut for mastodon.

[-] crunchpaste@lemmy.dbzer0.com 4 points 6 months ago

While complex tuis are definitely not my cup of tea (I prefer cli tools to be simple, otherwise I would probably use a proper gui), I'm really happy that I'm not the only one wishing for a way to access lemmy from the terminal.

[-] noctisatrae@beehaw.org 4 points 6 months ago

I’m too working on a TUI to browse the-eye.eu, I’m still struggling with asynchronous render & Rust.

[-] crunchpaste@lemmy.dbzer0.com 3 points 6 months ago

Async programming is really quite hard to wrap your head around. Currently I'm mostly struggling with excessive memory consumption.

[-] noctisatrae@beehaw.org 2 points 6 months ago* (last edited 6 months ago)

Send help I’m struggling with lifetimes, unbounded channel & implementing EventHandler… <3

[-] wiki_me@lemmy.ml 4 points 6 months ago

Link returns "This site can’t be reachedThe webpage at https://files.catbox.moe/8g7agm.mp4 might be temporarily down or it may have moved permanently to a new web address.".

Do you have a github or codeberg link?

Maybe we should add it to awesome-lemmy?.

[-] crunchpaste@lemmy.dbzer0.com 3 points 6 months ago

Link returns “This site can’t be reachedThe webpage at https://files.catbox.moe/8g7agm.mp4 might be temporarily down or it may have moved permanently to a new web address.”.

It seems to be working for me.

Do you have a github or codeberg link?

I didn't think anyone would have interest in it so i haven't uploaded it. After new year's I could clean it up a bit and host it on github.

Maybe we should add it to awesome-lemmy?.

I think it may be e a bit too early for that. At the current state it supports dynamic fetching of the feed in the background (quite buggy), paginating and displaying long posts and displaying top level comments only. At the current state it's quite enough for me to enjoy a few (more like a few dozen) posts, but definitely not anywhere close to "awesome".

[-] mesamunefire@lemmy.world 3 points 6 months ago

Something like rtv would be great!

[-] taanegl@beehaw.org 3 points 6 months ago

He's a mad man, a mad man!

But cool! Any hopes for image and video support?

[-] isotope@lemm.ee 3 points 6 months ago

Looks good! You might want to join forces with https://github.com/LunaticHacker/lemmy-terminal-viewer

[-] MonkderZweite@feddit.ch 2 points 6 months ago

One reason more to stop with the silly text-in-image posts. There's a text-only post option, you know guys? Lemmy is not Instagram.

[-] nix@merv.news 2 points 6 months ago

How did you upload a video?

[-] crunchpaste@lemmy.dbzer0.com 4 points 6 months ago

Uploaded it to catbox.moe and then just pasted the link in the url field when creating the post. Hope that helps :)

[-] MonkderZweite@feddit.ch 1 points 6 months ago* (last edited 6 months ago)

There's TIV/FIM/imgfb if you're looking for ways to render images in terminal. Or convert them to sixel.

[-] nmtake@lemm.ee 1 points 6 months ago
this post was submitted on 28 Dec 2023
266 points (97.5% liked)

Linux

45457 readers
1306 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS