Live data from Hacker News

Ask HN: What features for an offline Hacker News reader?

news.ycombinator.com

1–10 of 40 posts

Ask HN: What features for an offline Hacker News reader?

#1
HN is a treasure trove of information. The primary way I read HN is to bookmark stories and read the comments when the discussion is complete. Others actively participate. Some get jobs via "Who is hiring?". We all use HN differently.

There are ways to read HN other than this website. However, I have not found one that meets all of these requirements:

  - Self-hosted.
  - Offline access of data.
  - Query data via SQL.
  - Full text search of stories and comments.
  - Notification of replies to comments.
Some ideas:

1) A tool that maintains a copy of the HN API[1] in an SQLite database, with indexing and full-text search[2]. This supports the development of the other tools.

2) A command line tool that demonstrates how to use the database and supports the development of scripts. For example:

  #!/bin/sh
  # Run notify whenever someone replies to a comment.
  $ hn replies username | notify
3) A web UI for browsing and searching. This can be hosted locally or on a remote server.

What features interest you?

  [1]: https://github.com/HackerNews/API
  [2]: https://www.sqlite.org/fts5.html

Re: Ask HN: What features for an offline Hacker News reader?

#2
I'm thinking about the same thing i.e. building a personal HN reader with Python and QT.

I have never explored the API, and I'm not a professional programmer, but allow me to describe the ideas from top of head when I read your posts:

Requirements:

1 - Self-hosted: So essentially, it's too heavy to keep the whole sites offline. However, because I always read by topic (e.g. I'd type "SICP ycombinator" in Google and read the top pages), I think one approach is to let the user enter a topic, say "SICP", as well as number of top-level stories to return, say 25, and invoke the API to return stories. The app will then dump the stories and their comments into a database with data modelling that suits for a forum.

2 - Offline access of data: Essentially what I mentioned above. The app should also allow user to remove a story (and its children), modify topics, favorite a story and create new topics. I think those are the barebone requirements. The backend would interact with the database and do updates.

3 - Query data via SQL: I think it might be too much work to parse queries, and the easiest thing to do is to just access a string as query and pass that to the database engine. Or maybe only allow user certain actions and let the backend assemble the queries.

4 - Full text search of stories and comments: Not sure what to do as my programming knowledge is very limited. I saw the second link you provided and it is very interesting.

5 - Notification of replies to comments: Maybe give user a button to update all his favorite stories.

TBH I really want to see what other people's implementations will be.

Re: Ask HN: What features for an offline Hacker News reader?

#3

I'm thinking about the same thing i.e. building a personal HN reader with Python and QT. I have never explored the API, and I'm not a professional programmer, but allow me to describe the ideas from top of head when I read your posts: Requirements: 1 - Self-hosted: So essentially, it's too heavy to keep the whole sites offline. However, because I always read by topic (e.g. I'd type "SICP ycombinator" in Google and re…

I prototyped this in Qt 2 years ago: https://ers35.com/files/hackernews-qt.png

1) It is possible to keep the whole site offline. A database from 2017 is 9 GB: https://archive.org/details/hackernews-2017-05-18.db I think a 2020 DB could be less than 20 GB.

2) My focus is on reading, not writing. Local favorites make sense. Maybe with importing public favorites. A user can set their name without logging in.

3/4) SQLite does the heavy lifting here.

Re: Ask HN: What features for an offline Hacker News reader?

#4
Definitely sane, responsive thread layouts with more readable text. HN has, let us say, a very “traditional” approach to HTML, and it is _very_ hard to read on some devices (I wish that someone revised the markup accordingly).

Which is why I usually read it on https://hackerweb.app/ instead.

Forking https://hackerweb.app and adding offline support would be a good starting point, IMHO.

Re: Ask HN: What features for an offline Hacker News reader?

#6
I'd be very interested in something that can cache the actual article/page from the main HN link as well as a reading list.

There are times when I add HN articles to mobile chrome's "read later" list, and when I have time go through them. Being able to read them later when not having internet access would be amazing (London's tube is annoying when it comes to internet, internet only exists in the stations).

Re: Ask HN: What features for an offline Hacker News reader?

#7
post #6

I'd be very interested in something that can cache the actual article/page from the main HN link as well as a reading list. There are times when I add HN articles to mobile chrome's "read later" list, and when I have time go through them. Being able to read them later when not having internet access would be amazing (London's tube is annoying when it comes to internet, internet only exists in the stations).

Great idea. This could also be useful to post a mirror for other users if the site ends up going down.

Re: Ask HN: What features for an offline Hacker News reader?

#9
post #8

If up/downvoting would work in Lynx, I wouldn't actually need a CLI tool to read HN. Well, I guess you can't have anerything. I wouldn't need offline mode, but a CLI tool to read HN would be very much welcome.

You might find this interesting: https://github.com/donnemartin/haxor-news
Post reply on HN