Show HN: Circumflex, browse HN in your terminal
180 points| bensadeh | 3 years ago |github.com
`clx` is written in Go using Bubble Tea[1]. You can read the comment section or the linked article in reader mode in the pager `less`.
Using `lesskey` to add custom keybindings, the replies can be collapsed and expanded in real-time (but not individual replies, only all replies at once). Behind the scenes I am appending invisible unicode characters to each line so that I can use the custom keybindings to filter them out. The same technique is used to allow for jumping between top-level comments.
I spent a lot of time thinking about syntax highlighting and finding relevant bits to highlight while also not going overboard with colors. The end result is highlighting of things I find useful for providing context in the comment section, like indicating parent poster and original poster, coloring references, coloring indentations as well as formatting YC startups.
Other quality of life features include adding submissions as favorites (it is stored as a pretty-printed json so you can check it into your vcs to allow for readable diffs). Submissions are marked as read and new comments are indicated with a bullet point.
luke8086|3 years ago
If you don't mind a bit of a shameless plug, I've also recently built a terminal client for HN [1], although with a slightly different objective - to make it look less like a website, and more like a traditional mail/news reader (i.e. mutt/slrn)
It's not going to have any advanced features because I mostly wrote it for my own use, but maybe someone finds it useful.
[1] https://luke8086.neocities.org/retronews.html
epilys|3 years ago
https://github.com/epilys/nntpserver.py
dusted|3 years ago
GekkePrutser|3 years ago
I'm very happy with glider on mobile but still looking for something in the terminal.
xcambar|3 years ago
darkteflon|3 years ago
9dev|3 years ago
soebbing|3 years ago
bensadeh|3 years ago
doix|3 years ago
But I guess that would mean moving away from less for the comments.
bensadeh|3 years ago
anupj|3 years ago
msravi|3 years ago
https://imgur.com/a/4PrpwTc
I installed using brew on linux mint. The "correct" version of less seems to be in the path
bensadeh|3 years ago
justaj|3 years ago
From the top of my head this is my personal list of minimum requirements such an app would have to support:
1. Text search within all of comments in a thread.
2. Easy command collapse/expand workflow when viewing threads.
Glancing through the doc it seems that this app doesn't (yet) support either of these requirements, is this correct?
bensadeh|3 years ago
2. You can collapse / expand the comment section with h/l or left arrow and right arrow. The limitation to this is that it is not possible to collapse specific threads / replies, only all replies at once.
heliostatic|3 years ago
jbverschoor|3 years ago
dgl|3 years ago
[1]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3c...
bensadeh|3 years ago
replwoacause|3 years ago
clx -u --url OR clx -l --link
bensadeh|3 years ago
hackarama|3 years ago
owenpalmer|3 years ago
NiloCK|3 years ago
Any interest in adding logged-in-user effects?
nidnogg|3 years ago
lioeters|3 years ago
dgl|3 years ago
dgl|3 years ago
https://imgur.com/a/DlrEbvI
alexmolas|3 years ago
qingfengasahi|3 years ago
_ph_|3 years ago
Normille|3 years ago
bensadeh|3 years ago
imiric|3 years ago
Any plans for adding login and posting support?
bensadeh|3 years ago
replwoacause|3 years ago
arthurcolle|3 years ago
math-dev|3 years ago
And damn you so awesome!
bensadeh|3 years ago
On linux you can still install with homebrew[1], but if you prefer you can install from source as well. Follow the installation instruction for installing Go, maybe your distro has a preferred way. Then you can clone the repo and either 1. install the binary with `go install` (make sure $GOPATH/bin in in your path variable) or 2. run with `go run main.go`.
On a side note, I am looking for help to add `clx` to linux package managers.
[1] https://docs.brew.sh/Homebrew-on-Linux
d4rkp4ttern|3 years ago
joshxyz|3 years ago
gravlaks|3 years ago
danielmr6|3 years ago
trasz|3 years ago
notacoward|3 years ago