Live data from Hacker News

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

github.com

11–20 of 34 posts

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

#11
post #9

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

> 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 au…

Actually, I wasn't even aware that there is HN Algolia API :-)

From quick look, it seems the Algolia API offers a Search API which I don't think you can implement using the official API.

However, the official API seems to have a big advantage that it tells you which were the items that were updated recently - i.e. scores, comments, stories, etc. Using this you can implement real-time updates of the screen by fetching only the modified items. I believe using the Algolia API you would need to fetch everything over and over.

But other than that, the two APIs are similar. I guess the official one is more low-level than the other. The main difference is that you need to fetch the children one-by-one while with Algolia you seem to get this in one call.

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

#13
post #6

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

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.

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

#16

Can you please replace the gifs with something like asciicinema? They are really bad looking on mobile :(

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.

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

#17
post #10
post #6

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

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.

HN looks good in regular text-based browsers. I use Links[0].

[0]: http://links.twibright.com/

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

#18
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.

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

#19
post #6

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

I use Newsboat and newspaper3k for that, works pretty well.

Example: https://hund.tty1.se/2020/07/29/an-introduction-to-the-web-f...

You can add the HN feed with hnrss: https://hnrss.github.io/

Maybe not the best solution, but I've been using it for a couple of weeks and it works.

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

#20
post #15

This is really nice. The ranking of the submissions seems to be no in sync with HN web. Why is that the case?

If I understand correctly, Algolia front-page API[0] only allows you to get at most 34 stories (either with `sort_by` points or submitted date).

Hacker News official APIs[1], on the other hands, use a specific algorithm to determine the ranking of submissions and allow you to get at most 500 stories.

[0]: https://hn.algolia.com/api/v1/search?tags=front_page&hitsPer...

[1]: https://github.com/HackerNews/API

Post reply on HN