6 ms·
Follow Hacker News from the Console
- pg 18y agoWow. This looks great. How often does it poll the server?
- pkrumins 18y agoIt polls the server once per 30 seconds (it's the default). The polling interval can be changed via '-i' command line option.
- michaelneale 18y agokinda disappointing that in 2008 we still have to poll to get any sort of push on the web. But hey, it works. (yes there is the "comet" style of things to - perhaps pg will provide some API to work like that).
- pg 18y agoThat's a bit fast. And uselessly so, because the frontpage is only regenerated every 90 seconds. How about putting your email in your profile so we can continue this by email?
- pkrumins 18y agoDone. (it's peter at catonmat dot net)
- tlrobinson 18y agoCool, but lynx "http://news.ycombinator.com" is almost identical. A little shell script magic gets you auto-refreshing: #!/bin/sh while true; do sh -c "sleep 90; pkill lynx" & lynx "http://news.ycombinator.com" done (there's probably a better way that won't kill all your lynx sessions)
- there 18y agowhile true; do clear; lynx -dump -nolist http://news.ycombinator.com/ http://news.ycombinator.com/; sleep 90; done
- pkrumins 18y agoI have not written about it yet, but the hacker-top program contains a python module called 'pyhackerstories.py' which you can import 'get_stories' function from. Then you can do tricks like these: >>> from pyhackerstories import get_stories >>> stories = get_stories() >>> for story in stories: ... print "%2d. %s (%d)" % (story.position, story.title, story.score) ... 1. Hans Reiser leads police to body, believed to be his wife (23) 2. Follow Hacker News from the Console (18) 3. Scaling on EC2 - WebMynd's experiences (YC Winter '08) (57) 4. Google Protocol Buffers - Open Sourced (19) 5. Balsamiq - Software and Website Mockup App (47) ... Cheers :)
- fromage 18y agowatch -n 90 lynx -dump -nolist http://news.ycombinator.com/
- tlrobinson 18y agoSure, but you don't get the color :)
- god 18y agoIs it possible to get rid of all the metadata in Lynx, like image names etc? I tried "lynx -verbose" but it still displays stuff like [INLINE] and [LINK].
- nadim 18y agoIn case you're in the same boat as me: http://www.apple.com/downloads/macosx/unix_open_source/lynxtextwebbrowser.html http://www.apple.com/downloads/macosx/unix_open_source/lynxt... I can't believe it took me this long to realize it's not included.
- deleted 18y ago[deleted]
- shafqat 18y agoVery nice... Sometimes I forget how fun it is being a nerd. I love this kind of stuff.
- axod 18y agoNice, but using Putty for the screenshots? ;)
- rmanocha 18y agoLooks great. I have wanted to do something similar (not for HN...) for a while now, but never really got around to learning curses etc. Can you write a post here or on your blog explaining the steps involved or maybe give a link to the curses tutorial you used - or did you just know all this stuff already :).
- endlessvoid94 18y agoi like it. this could've been done hundreds of different ways (rss, lynx, etc, etc.) but i still like it. python rocks.