3 ms·
lynx
by fascinated 11y ago
lynx
- jrcii 11y agoYou could /almost/ have this with newsbeauter and lynx, except that the RSS feed doesn't include points or comment number and lynx doesn't indent comments, so all comments appear at the same thread level which is somewhat confusing.
- profsnuggles 11y agoI use this in my elinks hooks.pl to indent hn comments. use strict; use warnings; use Encode; use Mojo::DOM; sub pre_format_html_hook { my $url = shift; my $html = Mojo::DOM->new(decode_utf8(shift)); if ($url =~ 'news\.ycombinator\.com') { $html->find('img[src="s.gif"]')->each(sub { my $e = shift; my $w = $e->attr('width'); my $ns = ' ' x ( $w / 10 ); $e->replace($ns); }); } return $html; }