6 ms·
Show HN: hackernews_tui – A Terminal UI to browse Hacker News discussions
- bminusl 5y agoI maintain a list[1] of FOSS tools that improve the Hacker News experience. You might be interested in the CLI & TUI section[2]. [1]: https://github.com/bminusl/awesome-hackernews https://github.com/bminusl/awesome-hackernews [2]: https://github.com/bminusl/awesome-hackernews#cli--tui https://github.com/bminusl/awesome-hackernews#cli--tui
- bifrost 5y agoooooh! This sounds like its made for me, can't wait to try it out.
- Galanwe 5y agoWow really well made! Will definitely try it out.
- fouc 5y agoI was thinking that it might be nice if hitting ? also opened up the help menu.
- aome510 5y agoYeah, 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.
- hliyan 5y agoWhat 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 https://github.com/donnemartin/haxor-news
- aome510 5y ago> 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.0 https://github.com/aome510/hackernews-TUI/releases/tag/v0.6....
- aome510 5y agoExactly 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.
- hjek 5y agoHN looks good in regular text-based browsers. I use Links[0]. [0]: http://links.twibright.com/ http://links.twibright.com/
- axiolite 5y agoThat'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.
- xianx 5y agoI use Newsboat and newspaper3k for that, works pretty well. Example: https://hund.tty1.se/2020/07/29/an-introduction-to-the-web-feed-client-newsboat.html 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/ https://hnrss.github.io/ Maybe not the best solution, but I've been using it for a couple of weeks and it works.
- aome510 5y agoI just played around with newspaper3k today, and it works really well out of the box. I plan to add support for article view reader mode with newspaper3k integration. My current approach is to create a child process with `std::Process:Command` then run a python script. Doesn't seem to be the best approach, but I guess it's the easiest one.
- ggerganov 5y agoGood 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 https://twitter.com/ggerganov/status/1337719342465748993
- aome510 5y ago> 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 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 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?
- ggerganov 5y agoActually, 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.
- divbzero 5y ago+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.)
- aome510 5y agoupdate: 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.
- denysvitali 5y agoCan you please replace the gifs with something like asciicinema? They are really bad looking on mobile :(
- aome510 5y agoJust 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.
- nafizh 5y agoThis is really nice. The ranking of the submissions seems to be no in sync with HN web. Why is that the case?
- aome510 5y agoIf 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&hitsPerPage=100 https://hn.algolia.com/api/v1/search?tags=front_page&hitsPer... [1]: https://github.com/HackerNews/API https://github.com/HackerNews/API
- sm1ch 5y agoFantastic! 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 5y agoThanks 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 :<.
- sm1ch 5y ago> I guess what you want is navigating between sibling comments right? It's actually more than that: when there are lots of sub-comments, it helps to see the immediate "mother" of the comment node you're reading. Imagine a comment that has two replies, and the first reply has dozens and dozens of sub-replies and sub-sub-replies, which typically veer into all sorts of adjacent issues. By the time I'm done with the 1st reply and its dozens and dozens of sub-replies, it is often unclear what the initial comment (or even topic) was. It is then very helpful to be able to glance back up to the initial comment across the now-collapsed first reply and its dozens and dozens of sub-replies, before reading reply #2. Simply navigating to reply #2 doesn't give you that. > don't really get this feature. Can you elaborate more? I mean this page of the HN site: https://news.ycombinator.com/active https://news.ycombinator.com/active . It has the currently actively discussed stories, and is a great way to catch up after not reading HN for a day or two. A kind of intermediate step between best ( https://news.ycombinator.com/best https://news.ycombinator.com/best ) and the homepage. [Edit: the 'active' page apparently has an RSS feed here, in case you would be inclined to add it: https://hnrss.org/active https://hnrss.org/active ]
- didizaja 5y agoThis 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 https://github.com/zaataylor/rich-hn edit: currently installing Rust
- aome510 5y agoThank you for your kind words. Contributing and feedbacks are highly appreciated!