top | item 26929588

Show HN: hackernews_tui – A Terminal UI to browse Hacker News discussions

160 points| aome510 | 4 years ago |github.com

31 comments

order
[+] hliyan|4 years ago|reply
What I really want is a reader view on the terminal -- something that cuts out all layout, formatting and images and shows me the raw article text in a fixed with font. Ditto for comments. I've already tried the "hn" [1] command line tool, but it doesn't strip out navigation menus, heads and footers from articles. It's also a bit slow.

[1] https://github.com/donnemartin/haxor-news

[+] aome510|4 years ago|reply
> something that cuts out all layout, formatting and images and shows me the raw article text in a fixed with font.

FYI, I have implemented a reader view for `hackernews_tui v0.6.0` [0] which seems to satisfy most of the conditions above. Judging from my experience, this reader view works quite well and can cover many use cases.

[0]: https://github.com/aome510/hackernews-TUI/releases/tag/v0.6....

[+] axiolite|4 years ago|reply
That's why I like RSS. Strip out everything but the content and use whatever UI I prefer. Newsbeuter is a good RSS readers for the terminal. Several services and open source programs like TT-RSS allow you to get the full-text instead of just a blurb. And for sites without RSS feeds, there are services that make it easy to scrape HTML pages and output an RSS feed.
[+] aome510|4 years ago|reply
Exactly this! I also want the same thing but didn't really find a good way to achieve it during my first find a while ago.
[+] ggerganov|4 years ago|reply
Good to see more TUI programs getting attention, well done!

What are some additional features in mind that you are planning to add?

Here is an idea for extra hacker vibe - try adding "The Matrix" effect when rendering the screen:

https://twitter.com/ggerganov/status/1337719342465748993

[+] aome510|4 years ago|reply
> What are some additional features in mind that you are planning to add?

I don't really have any particular ideas in mind rn. I would love to receive feedbacks and ideas from the community.

> Here is an idea for extra hacker vibe - try adding "The Matrix" effect when rendering the screen: https://twitter.com/ggerganov/status/1337719342465748993

Wow this looks dope. I'll try it out.

I just realize that you are the author of https://github.com/ggerganov/hnterm. I just came across with it recently while finding some HackerNews apps on GitHub. If I understand correctly, `hnterm` seems to use the official Hacker news API for rendering. I found it quite hard to use compared to the HN Algolia APIs. Do you have any suggestions on how to utilize the official APIs better?

[+] divbzero|4 years ago|reply
+1 on seeing more text-based interfaces. Also worth mentioning are alternative HN gateways:

  gopher://hngopher.com
(Edit: There is also a Gemini gateway by Drew Devault that appears to be down for the time being.)
[+] didizaja|4 years ago|reply
This is an amazing looking TUI, and I can tell you've put a lot of work and thought into this. Amazing job! You're making me want to install/learn Rust so I can try this out and/or contribute to this (if contributors are allowed, that is). :)

Also, what a small world! I've been building a similar, Python-based application [0] for reading HN for the last few months, but it's nowhere near as nice-looking or complex as yours (and currently only an MVP that uses less with the -R flag lol). I actually grabbed the data based on parsing raw HTML, but using Algolia is something I hadn't considered.

[0]: https://github.com/zaataylor/rich-hn

edit: currently installing Rust

[+] aome510|4 years ago|reply
Thank you for your kind words. Contributing and feedbacks are highly appreciated!
[+] sm1ch|4 years ago|reply
Fantastic! Here are three features that I would love to see:

1. collapsable threads, ideally with three different shortcuts: (i) collapse daughters of current comment, (ii) collapse mother of current comment - this is very useful when on the Nth comment far away below the mother comment, so no need to scroll up, but can continue reading the sister of mother's comment, (iii) collapse entire thread.

2. A story view for the /active section. I think there is no official API for it, but I find it to be the most useful entrypoint into HN at the beginning of the day, to catch up.

3. Semi-offtopic dreamland: a version adapted to (a terminal in) the remarkable and related tablets :)

Great job as it stands already though.

[+] aome510|4 years ago|reply
Thanks for the ideas!

> 1. collapsable threads, ideally with three different shortcuts: (i) collapse daughters of current comment, (ii) collapse mother of current comment - this is very useful when on the Nth comment far away below the mother comment, so no need to scroll up, but can continue reading the sister of mother's comment, (iii) collapse entire thread.

Please correct me if I misunderstand your request. I guess what you want is navigating between sibling comments right? It seems that most of the use cases you mention above can be done with a combination of `l` (move to the next sibling) and `h` (move the previous sibling) commands.

> 2. A story view for the /active section. I think there is no official API for it, but I find it to be the most useful entrypoint into HN at the beginning of the day, to catch up.

I don't really get this feature. Can you elaborate more?

> 3. Semi-offtopic dreamland: a version adapted to (a terminal in) the remarkable and related tablets :)

Yeah, I also would love to achieve this, but supporting tablets seems to be quite painful experience :<.

[+] Galanwe|4 years ago|reply
Wow really well made! Will definitely try it out.
[+] nafizh|4 years ago|reply
This is really nice. The ranking of the submissions seems to be no in sync with HN web. Why is that the case?
[+] denysvitali|4 years ago|reply
Can you please replace the gifs with something like asciicinema? They are really bad looking on mobile :(
[+] aome510|4 years ago|reply
Just try on my Firefox android, can agree that it looks awful. After a quick look into asciicinema, it seems to only allow recording terminal.

This doesn't fit into my use case as I want to record the whole screen to show keys like `O`, `S` that interact with the external browser.

[+] fouc|4 years ago|reply
I was thinking that it might be nice if hitting ? also opened up the help menu.
[+] aome510|4 years ago|reply
Yeah, I was thinking the same thing. The main reason I didn't add `?` in the first place because I want users to be able to open the help menu while typing in the Search View.

That said, I'll definitely think more about this.

[+] aome510|4 years ago|reply
update: add `?` as a hotkey to open the help dialog in the new version `v0.5.1`. It seems that many feel more comfortable using `?` than `<ctrl-h>/<alt-h>` as the default hotkey.
[+] csomar|4 years ago|reply
Any chance to make shortcuts customizable. I'm used to Vim and it would be nice to have vim-like navigation instead of memorizing new keys.
[+] bifrost|4 years ago|reply
ooooh! This sounds like its made for me, can't wait to try it out.