Neat! I hadn't heard of elinks before. Sounds like a good idea. Do you use it for many sites other than news aggregation sites like HN and Reddit? Do normal sites render OK?
Mostly, they do. I use it for lots of web browsing, and most sites are fine, and it even obeys much of the styling, etc. However, some sites, like overcomingbias.com, get partially corrupted (like bad-decompression-corrupted, not looks-kinda-odd-corrupted), sometimes. Reloading often fixes the problem. I assume there's some issue with the gzip integration.
I like this, but does it really make sense to call it a "command-line" application? I'd call it a terminal application (like w3m, lynx, etc). I can also type "firefox http://news.ycombinator.com/ at my shell, but I don't think that makes it a command-line app.
I'm not sure what the distinguishing features are between a command-line app and a terminal app (I think that it's pretty pedantic to say that there's a difference, though I'm all for pedantry and I'd love to know what the difference is).
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.
As I understand it, a command-line app is typically something which is only accessed from your shell's command line, like 'ls'. You can type 'ls' and follow it with whatever arguments you want to follow it with, but it will always land you back at your command prompt (excepting crashes or infinite loops, of course). It's user interface IS the command line.
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.
hnsh is a program I wrote to let you catch up with HN from the shell. You can browse the front page, open up stories and open up comments. There are a couple other nifty features, but they're all listed on the page for you to read, so there's no use re-posting them here.
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.
Just to be clear, you're trying to run the program from behind a proxy, yeah?
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!
> you're trying to run the program from behind a proxy, yeah?
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:
You're right -- lynx would do it (and even better with the markup change). Would it do stuff like remember the stories you'd read or the way you like looking at stories though?
(totally legitimate question, btw -- I'm interested in this stuff.)
I'm not accepting patches at the moment, but that's not out of fierce overprotectiveness of my code -- I just didn't think there'd be any demand for it.
This is really cool. A lot of people said text based browsers would probably do the trick without having to write a bunch of python code -- but I would guarantee you learned something in the process.
Looks interesting, but it does defeat the distraction-limiting device of having the only browser in you office on the laptop across the room. With this, I can procrastinate from any terminal.
I haven't yet tried out HN on my new Droid, but I've found that I far prefer purpose-built apps over just using "normal" sites. For example, the twitter app is much easier for my fat fingers than using the twitter site via the Android browser. With an API,....
The thing is, I could, but because I'm not at all related to HN in any official way, it would be up to me to change how the API gets data from HN whenever HN changes anything at their end. That would mean there'd probably be a delay between HN making changes and me making changes, during which time any applications using the API wouldn't work.
I'd happily do it with the blessing of the officials at Y Combinator :)
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]
At the moment, the most you can do with comments is open them up in your browser.
Could 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?
If you're involved in a comment thread, the discussion stays alive better if you respond promptly. But how do you know if people when people have responded to your comments? You can refresh the page but if you have several threads on the go at the same time, this might not be practical.
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
Here is how I run it:
$ elinks news.ycombinator.com
Then: