hackernews_tui 0.3.0

A Terminal UI to browse Hacker News
hackernews_tui-0.3.0 is not a library.

hackernews-TUI

hackernews_tui is a Terminal UI to browse Hacker News written in Rust.

The application mainly consists of the following views:

  • Story View - Front Page displaying a list of stories in front page of Hacker News.
  • Comment View displaying a list of comments in a story.
  • Story Search View displaying a search bar and a list of stories matching the search query.

Installation

Using cargo

Run cargo install hackernews_tui to install the application as a binary.

Using archlinux AUR

Run yay -S hackernews_tui to install the application as an AUR package.

Examples

Story View - Front Page: Example of a Story View - Front Page

Comment View: Example of a Comment View

Story Search View Example of a Story Search View

Documentation

Keyboard shortcuts

In each View, press <ctrl-h> to see a list of supported keyboard shortcuts and their functionalities.

Global key shortcuts:

  • <ctrl-h>\<alt-h>: Open the help dialog
  • <ctrl-s>\<alt-s>: Go to the story search
  • <ctrl-f>\<alt-f>: Go to the front page
  • <ctrl-q>\<alt-q>: Quit the application

In case the above shortcuts don't work, you can always use the corresponding buttons at the bottom of the View: Footer buttons

Key shortcuts for each View:

StoryView

  • j: Focus the next story
  • k: Focus the previous story
  • t: Focus the story at the top
  • b: Focus the story at the bottom
  • {story_id} g: Focus the {story_id}-th story
  • <enter>: Go the comment view associated with the focused story
  • O: Open in browser the link associated with the focused story

CommentView

  • j: Focus the next comment
  • k: Focus the previous comment
  • t: Focus the comment at the top
  • b: Focus the comment at the bottom
  • l: Focus the next comment with smaller or equal level
  • h: Focus the previous comment with smaller or equal level
  • O: Open in browser the link associated with the discussed story
  • {link_id} f: Open in browser the {link_id}-th link in the focused comment

SearchView

In SearchView, there are two modes: Navigation and Search. The default mode is Search.

Search mode is similar to Vim's Insert mode, in which users can input the query string.

Navigation mode allows the SearchView to behave like a StoryView with all StoryView shortcuts enabled.

Switch mode key shortcuts:

  • i: Enter Search mode from Navigation mode
  • <esc>: Enter Navigation mode from Search mode

Navigation mode supports all StoryView's key shortcuts.

Roadmap/TODO List

TBA...