
Hacker News in the Terminal - AndrewVos
http://andrewvos.com/2013/08/02/hacker-news-in-the-terminal/
======
ck2
_There are no links to comments, because you should never read the comments._

wait, what? There are some great comments around here.

~~~
krapp
Right? It's a forum, not a link aggregator. Comments are the entire point.

~~~
aspensmonster
Grabbing all the comments and intelligently displaying them in a terminal
would require substantially more work, I suspect.

~~~
Watabou
Then the author should say that. "You should never read comments" just doesn't
make sense in HN when comments are the entire point of why I'm here.

Right now, I don't see why I should use this tool when I can just use elinks.

~~~
devgutt
I used to use elinks with a filter (words.txt) by topic

    
    
      elinks -dump news.ycombinator.com | sed -n -e 's/\([0-9]\+\)\.\ \+\(\[.\+\]\)\+\(.*\)/\1: \3/p' | grep -f words.txt -i

------
MatthewPhillips
Or just use elinks, which works great:
[http://i.imgur.com/FuxUew1.png](http://i.imgur.com/FuxUew1.png)

~~~
jlgreco
Unfortunately comments don't nest nicely in elinks. Otherwise it's great.

~~~
MatthewPhillips
That's because HN uses an image tag to do the nesting and apparently elinks
ignores the width property on image tags.

~~~
IanCal
I'm quite disappointed that this is the case. I don't expect a crazy parallax
motion-sickness inducing css3 but I do expect decent markup.

I was disappointed when you said they used images.

I was more disappointed when I looked at the source and realised it's _nested
tables_.

For shame, HN. For shame.

~~~
NathanKP
If it bothers you submit a pull request that fixes it.

~~~
timothya
To where?

As far as I know, the current version of HN isn't open source.

~~~
nilved
Indeed it definitely isn't.

------
moocowduckquack
It should be possible to do this in a line of bash, this is my current start
point -

    
    
      curl https://news.ycombinator.com | sed 's|<[^>]*>||g'
    

edit - for reference, this is being done in an osx 10.7.5 terminal, so ymmv

getting somewhereish, I only have a slight understanding of regex to be honest
:)

    
    
      curl https://news.ycombinator.com | sed 's|<[^>]*>|-|g' | sed -e 's/-------/\'$'\n/g'
    

...

    
    
      curl https://news.ycombinator.com | sed 's|<[^>]*>|-|g' | sed 's|------------|-|g' | sed -e 's/-------/\'$'\n/g'

------
tlarkworthy
50 commentators fail to get the comment joke... (he is British I spose)

~~~
AndrewVos
I don't get the British reference?

------
wwwwww
comments are essential to much of HN

~~~
Zikes
Yep, sometimes that's where the real story is at. Heck, one of today's front
page posts is comprised almost solely of two HN comments.

~~~
mbreese
I see one with three comments, but not one with two...

Oh well.

But, you're right, comments are really where places like HN shine.

~~~
Zikes
I was referring to the blog post[1] which was basically a copy and paste of
two comments on a previous HN post.

[1]
[https://news.ycombinator.com/item?id=6146930](https://news.ycombinator.com/item?id=6146930)

------
gre
Wrote this into Factor last year. It even has the orange color in the
terminal!

[https://github.com/slavapestov/factor/blob/master/extra/hack...](https://github.com/slavapestov/factor/blob/master/extra/hacker-
news/hacker-news.factor)

    
    
        IN: scratchpad USE: hacker-news USE: io.streams.256color [ hacker-news. ] with-256color`

Hacker News

1\. FBI pressures Internet providers to install surveillance software
(news.cnet.com) 104 points by ojbyrne 2 hours ago | 32 comments

2\. Hard drive hack provides root access, even after reinstall
(spritesmods.com) 200 points by pd0wm 5 hours ago | 46 comments

..

------
ordinary
_comments powered by Disqus_

------
a-b
Why not to use regular text browser like links or elinks?

$links [https://news.ycombinator.com/](https://news.ycombinator.com/)

------
footoverhand
I was first interested in this post since I do most of my HN browsing via
newsbeuter/w3m which are terminal applications. To post, the easiest way seems
to be to just pull up the story in my web browser.

------
themodelplumber
Hmm..this might be enough to get me to try Ruby. Looks neat and I've been
wanting to learn the language. I hate dependency plumbing but this looks like
it might work out of the (my) box.

~~~
AndrewVos
It's a very fun language. You should definitely give it a go.

------
a-b
[http://en.wikipedia.org/wiki/ELinks](http://en.wikipedia.org/wiki/ELinks)

------
__voidcast__
I may have been more inclined to use this, if it did have the feature to read
the comments!! More often than not, I go through the comments first just to
gauge the quality of the article and only if I am satisfied do I actually go
read the article. That's why I don't like using desktop rss tickers for HN.

------
rly_ItsMe
for just monitoring the news on a console I still use hackertop

[https://github.com/pkrumins/hacker-top](https://github.com/pkrumins/hacker-
top)

------
dchichkov
alias news='lynx [http://news.ycombinator.com'](http://news.ycombinator.com')

------
Aloha
Couldn't I just use links to get the same effect? But with the comments (what
I consider the best part of HN)

------
sea6ear
I've been reading HN in a terminal for a while via Emacs and w3m mode.

EDIT: or also, just use w3m outside of Emacs.

------
joeblau
Awesome little utility. Next step is letting me comment :).

------
serf
M-x hackernews

uses the api instead though.

------
dickler
emacs-w3m is the best hacker news reader!

------
mknappen
Thanks!

