6 ms·
Ask HN: Hacker News comment tree indentation on text-based web browsers?
I noticed on every text-based web browser I’ve tried (lynx, links, w3m), hackernews comment threads do not maintain the correct indentation in the comment tree, collapsing all parent and children into a single list. Are there perhaps any easy fixes or workarounds, such as another text-based browser to try, or some other way to parse comment threads that maintains the correct indentation?
- Kinnard 6y agoYou should also post on the arc forum which shares code with HN: http://arclang.com/forum http://arclang.com/forum They're both written in arc by pg: http://www.arclanguage.org/ http://www.arclanguage.org/
- taviso 6y agoI don't know the answer to your question, but I see no reason I couldn't add hn support to nntpit, if there was interest. https://github.com/taviso/nntpit https://github.com/taviso/nntpit
- loulouxiv 6y agoThat seems to be a good idea, the features offered by the news readers that you mention on nntpit github readme look like a must. I rarely return the a HN thread I already read since I have no way to know what is new or not
- akalsz 6y agow3m indents stuff correctly for me, using the version maintained for Debian: http://github.com/tats/w3m http://github.com/tats/w3m
- dcassett 6y agoI just installed w3m on debian buster stable (sudo apt install w3m) and I see an indent of 2 characters
- yewenjie 6y agoHN uses a very non standard way to visually represent comment trees — transparent gifs of different widths instead of real treelike data structures. The behavior of text based browsers is understandable.
- onion2k 6y agoThat might be non-standard now but spacer gifs did a lot of the heavy lifting in website layout between about 1995 and 2010.
- krapp 6y agoThe weird thing is, HTML already has (and had, even back then) a much simpler and more straightforward way to represent nested lists, but pg didn't want to use it because he thought W3C recommendations went against the spirit of explorational programming[0]. So the existing layout is the way it is just to be contrarian... which is remarkably on-brand for HN. [0]http://arclanguage.org/item?id=20788 http://arclanguage.org/item?id=20788
- Blikkentrekker 6y agoIf the domain not be well understood when one is crafting the markup for a layout as simple as Hacker News's, one simply lacks even the most basic experience. There is no need to use exploratory programming for such matters; it is a very common and well understood problem for which there are good and bad solutions. A simple `margin-left: 20px;` in CSS is a good solution; transparent spacing images are ridiculous.
- onion2k 6y agoone simply lacks even the most basic experience Considering pg's background I don't think it's that.
- Blikkentrekker 6y ago
- ExcavateGrandMa 6y agoit has a name => semantic nabz :Ð
- awefawef 6y agoComment rendering doesn't even work properly on normal browsers. If I go to a comment section with tons of comments and collapse a huge tree, subsequent collapses will immediately scroll the page all the way to the top, annoyingly. (Firefox, this happens on multiple computers)
- Dregas 6y agoI have a similar issue as well, with Firefox. It used to work just fine until a couple months or so ago.
- GekkePrutser 6y agoIs there no dedicated HN console reader for HN using ncurses? I never looked for one but I'd be surprised considering there's so many mobile apps
- tyingq 6y agoThere's this: https://github.com/ggerganov/hnterm https://github.com/ggerganov/hnterm Appears to be browse-only though.
- abrolhos 6y agoYou might find https://github.com/donnemartin/haxor-news https://github.com/donnemartin/haxor-news useful.
- zxcvbn4038 6y agoHave you looked at the hacker news API? There is enough information there to reconstruct a tree and do your own formatting. The only issue I've run into is that after some time changes don't seem to flow to the API any longer so you have discrepancies between the site and the API data - mostly comment orders since the scores don't flow to the API, but updates to text often get dropped.
- every 6y agolinks2 does not indent but links2 -g displays properly...
- asdff 6y agoI wish I could use links -g. I tried building on OS X with graphics enabled and I'm getting segment fault errors. Other X applications work fine, so I know the troubleshooting is going to be cryptic and take me hours.
- nazri1 6y agoUse mutt! Now you can read each post as if it was part of an email thread. But first you have to get the comments saved as a maildir email conversations... that’s where my fetchpost[1] tool comes in. Demo: https://asciinema.org/a/593u87rrsa3mevktyekepm4ke https://asciinema.org/a/593u87rrsa3mevktyekepm4ke [1] https://github.com/holygeek/fetchpost https://github.com/holygeek/fetchpost
- Giftcard203 6y agoYour Chance to get $100/$750 to your Cash App Account! Register your account and hand over the gift https://smrturl.co/o/166805/53177516?s1= https://smrturl.co/o/166805/53177516?s1=
- linguaz 6y agoI use ELinks, and with the following in my ~/.elinks/hooks.pl (& ELinks compiled with perl support), HN comment tree indentation looks fine: sub pre_format_html_hook { my ($url, $html) = (shift, shift); if ($url =~ m|news.ycombinator.com/item\?id=|) { $html =~ s|<img src="s.gif" height="1" width="([0-9]{1,3})">|' 'x($1/10)|eg; } return $html; }
- mouamud 6y agoHi