Live data from Hacker News

Show HN: Hnwatch – Linux x64 terminal-based real-time HN watcher/reader

2ton.com.au

41–49 of 49 posts

Re: Show HN: Hnwatch – Linux x64 terminal-based real-time HN watcher/reader

#42

lynx

You 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.

Re: Show HN: Hnwatch – Linux x64 terminal-based real-time HN watcher/reader

#46

Earlier quoted context omitted.

See prior comment about the intentional omission of "/list" functionality

Well I'd also take just one active room ;)

I'm gonna idle in 'chat' and see what happens.

Re: Show HN: Hnwatch – Linux x64 terminal-based real-time HN watcher/reader

#47
post #42

lynx

You 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.

I 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;
}
Post reply on HN