Hnsh - Hacker News from the command-line
scottjackson.org
scottjackson.org
Here is how I run it:
$ elinks news.ycombinator.com
Then:
Select story/comment : "Up" and "Down" arrows.
Open story/comment : "Enter"
Go back to previous page : "Back" arrow.
Quit : "q"I think hnsh is a command-line app. It uses text-based input to do things based on that input -- sometimes opening other applications, and sometimes printing things to the screen.
A terminal app (or a console app), while also accessed from one's shell, is not reliant solely on the shell's command line. It can have an interface of it's own, like 'hnsh' does, or like 'qbasic' in DOS does (did?).
By these definitions, all command-line apps are a subset of terminal/console apps, and not the other way around.
Personally, I do not think the difference is pedantic, but the terms do seem to get confused and muddled together frequently.
w3m http://news.ycombinator.com
image: http://bayimg.com/DAGbdAACJ
shortcuts: H : Help
TAB: Move to the next link
ENTER: Go to the current link
B: Go to the previous link
move around the text: hjkl
You can use the mouse of course.Hacker News, all keyboard, no mouse. Let me know what you think, HN.
I'll have to head off in a while (it's just past midnight here in Australia), but I'll definitely get back to any comments I miss.
http://quandyfactory.com/projects/32/stack_trace_for_hnshpy_...
Thanks for the stack trace -- having that makes a big difference :)
I'm not sure I can make it work with an arbitrary proxy, but I'm pretty sure I could get it to work with a proxy you know the address of. Proxies aren't my strong suit, sorry. We'll see what happens!
That's right.
> I'm not sure I can make it work with an arbitrary proxy
You could assume that users know their own proxy address (e.g. http://proxy.domain.com:80) and offer a prompt for them to input it. Then you can just save it in the config file.
I added an update to the stack trace page with some code for working with proxies:
http://quandyfactory.com/projects/32/stack_trace_for_hnshpy_...
Hope that helps!
It's getting pretty late now (just hit 3am), but check back at http://github.com/scottjacksonx/hnsh (or http://scottjackson.org/software/hnsh/) some time late tomorrow and the project should be hosted there, as well as your proxy fix.
It might also prod pg or whoever to use better markup so you don't see "[greyarrow]" as link text instead of "upvote".
(totally legitimate question, btw -- I'm interested in this stuff.)
I've joined github, and this will be the first thing that I put there, so check http://github.com/scottjacksonx or http://scottjackson.org/software/hnsh/ in a few days and we'll see what I did!
Good job scott! (nice name by the way)
Oh, how I wish there was an API... I kept the HTML-getting stuff in its own class, so if HN ever adds an API, I can slot that right in there instead.
This is an area where webapps should already be competitive.
I'd happily do it with the blessing of the officials at Y Combinator :)
Anyone have a link to a quick guide to code licensing for total newbies?
The first question you need to answer is whether you want a copyleft license[1], that requires all derivative works to be open sourced as well, or a more liberal license that allows one to use your code in a proprietary application.
If you are OK with a liberal license you probably want to pick either the BSD[2] or MIT[3] license. For example, Django uses a BSD license.
If you want a copyleft license you probably want to use GPL[4] or LGPL[5]
[1] http://www.gnu.org/copyleft/
[2] http://www.opensource.org/licenses/bsd-license.php
[3] http://www.opensource.org/licenses/mit-license.php
[4] http://www.opensource.org/licenses/gpl-license.php
[5] http://www.opensource.org/licenses/lgpl-license.phpCould you be more specific about the feature you're describing? Comments are an area I'd like to look at expanding on. I guess you mean tracking whether or not there are new comments on a story?
Ideally:
1) highlight comments that are new since the last time I viewed the comments,
2) alert me when a new comment has been added a specific thread
I use that for keeping track of who replied to my comments and stuff like that.