This is a script that fetches a discussion thread from Hacker News using its API, and converts it to Org mode for convenient reading from Emacs.
NOTE: This is a “first draft”, and it can be slow due to inefficient sequential network calls; this should be improved.
Patches welcome! Or better yet, rewrite it in your favorite language.
For example, given this URL:
https://news.ycombinator.com/item?id=10879529
run this command in your terminal:
$ hn2org 'https://news.ycombinator.com/item?id=10879529' > /path/to/file.org
Now you can open up file.org
in Emacs, and enjoy reading HN
comments with per-thread folding and unfolding. In particular,
reading deeply nested subthreads is much easier than on the website.
- Perl version 5.16 or higher
- The JSON module (available from CPAN)
This code is available under the same license as Perl 5.