Live data from Hacker News

Haxor News: Hacker News in the terminal

github.com

31–40 of 43 posts

Re: Haxor News: Hacker News in the terminal

#31
post #21
post #20

I've thought about building an API that integrates Twillo with the HN API. Lots of planes/airlines have free messaging wifi, but not free wifi. But, if you could text a number and get the top n stories, then read the comments and perhaps the text of the stories (?) would be pretty nice way to pass some time. Alas I haven't done it yet...

I think most of them pass DNS queries. You could do HN-over-DNS.

How do they pass DNS queries? Just UDP on 53? If so, you could just proxy instead of relying on the DNS protocol.

Re: Haxor News: Hacker News in the terminal

#32

Last spring I built a dashboard out of a Pocket C.H.I.P [1] and use haxor-news as one of the panes to refresh the top 10 HN posts every minute. It keeps me from mindlessly flipping to a HN tab to check for new posts, just glance over occasionally to see if anything looks interesting. 1. https://www.ecliptik.com/Pocket-CHIP-Terminal-Dashboard/

That’s a pretty neat idea, I may do something similar - if I can find which drawer I stuffed it in that is.

Re: Haxor News: Hacker News in the terminal

#33
post #25

Ironically one of the few websites I actually enjoy using in its web format is hacker news. Still, this looks really cool! Great job!

same here, I guess simplicity rules for some.

I read medium once a while and wish there is a full text version of that eye-candy site.

Re: Haxor News: Hacker News in the terminal

#34

Earlier quoted context omitted.

I tried just now and it seems the answer is "no" on comment indentation. I don't see any indentation at all, everything is a flat list, left justified. Edit: tried with elinks as well, same (more or less) thing. :-(

Same with lynx which is a bummer. I was half expecting HN’s layout to work everywhere.

Looks like HN actually uses JavaScript to indent, based on a attribute where n is the level of indentation. So it’s more a progressive enhancement than something built into the underlying HTML.

(Edit: I think my initial take above was wrong. Please see below.)

Re: Haxor News: Hacker News in the terminal

#35

Earlier quoted context omitted.

Same with lynx which is a bummer. I was half expecting HN’s layout to work everywhere.

Looks like HN actually uses JavaScript to indent, based on a attribute where n is the level of indentation. So it’s more a progressive enhancement than something built into the underlying HTML. ( Edit: I think my initial take above was wrong. Please see below. )

> Looks like HN actually uses JavaScript to indent

I’m not an anti-JS person, but why? CSS seems so much more sensible for that.

Re: Haxor News: Hacker News in the terminal

#36
post #21

Earlier quoted context omitted.

I think most of them pass DNS queries. You could do HN-over-DNS.

How do they pass DNS queries? Just UDP on 53? If so, you could just proxy instead of relying on the DNS protocol.

I would guess only port 53 to the DNS server that the DHCP server gives you.

Re: Haxor News: Hacker News in the terminal

#37
post #24

Shameless plug my Hacker News TUI app [1] here. I recently released a new version `v0.9.0` [2]. [1]: https://github.com/aome510/hackernews-TUI [2]: https://github.com/aome510/hackernews-TUI/releases/tag/v0.9....

Yours is made in Rust, the one in this article in Python.

Re: Haxor News: Hacker News in the terminal

#39
post #24

Shameless plug my Hacker News TUI app [1] here. I recently released a new version `v0.9.0` [2]. [1]: https://github.com/aome510/hackernews-TUI [2]: https://github.com/aome510/hackernews-TUI/releases/tag/v0.9....

I guess one of the benefits of HN using such simplistic styling is that its easy to make a TUI that basically resembles the site 100%. This looks awesome!
Post reply on HN