HackerNews
dot_files
HackerNews | dot_files | |
---|---|---|
5 | 1 | |
428 | 10 | |
- | - | |
3.5 | 1.8 | |
9 months ago | 12 months ago | |
Swift | Shell | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
HackerNews
-
Extracting Objects Recursively with Jq
A bit offtopic, but I don't see much people knowing/using the Algolia API[0]. It's much better to use than the HN official API[1], since it returns the whole tree data in one request.
Unfortunately (I guess this is a big reason why people don't use it), it doesn't sort the comments – if you need the orders, you'll have to parse HN HTML (or just use the official API).
Still just two requests (the HN site, the Algolia API) is much better than recursively requesting a hundred requests, so I use this approach in my client[2].
[0]: https://hn.algolia.com/api
[1]: https://github.com/HackerNews/API
[2]: https://github.com/goranmoomin/HackerNews
- macOS HackerNews client that aims to be a Mac-assed Mac app. Written in Swift + AppKit.
- Show HN: I developed a native macOS Hacker News client
- Show HN: I developed a native Cocoa Hacker News client
dot_files
-
Extracting Objects Recursively with Jq
I tend to use jq a lot. As others have said, sometimes jq can be hard to grasp. Often it requires multiple attempts to get the correct answer. To make it a little easier for me, I've written a helper function[0] that combines it with fzf[1] to run jq as a REPL on any json. It allows to incrementally alter your DSL without having to continually call jq. This is similar to jid/jiq but a little more powerful. It includes functions to change the preview to output raw, compact (or not), and some other things.
I didn't use jid/jiq because jid uses go-simplejson, which is nowhere near as powerful as jq, and jiq seemed very buggy when I used it and it felt like it was hacked together. Plus there was no where to change jq's arguments while running it.
I'm sure this function can be improved on, but this has been good enough for me so far.
Also, I run gojq[2] instead of jq. It is a drop-in replacement for jq but is written in Go, and has some improvements over jq such as bug fixes, support for yaml input, and it also provides more helpful error messages.
[0] https://github.com/hoshsadiq/dot_files/blob/master/zshrc.d/m...
What are some alternatives?
Le Wagon's Setup - Setup instructions for Le Wagon's students on their first day of Web Development Bootcamp
gojq - Pure Go implementation of jq
jfq - JSONata on the command line
protonmail-macos - Experimental email client for the ProtonMail service written in Swift.
fzf - :cherry_blossom: A command-line fuzzy finder
jet - CLI to transform between JSON, EDN, YAML and Transit using Clojure
benuse - An iOS widget-based HN reader
counsel-jq - Traverse complex JSON and YAML structures with live feedback
setup - My config, system settings, utilities, etc.