Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ggerganov/hnterm
:page_with_curl: Hacker News in the terminal
https://github.com/ggerganov/hnterm
hacker-news news terminal tui
Last synced: about 23 hours ago
JSON representation
:page_with_curl: Hacker News in the terminal
- Host: GitHub
- URL: https://github.com/ggerganov/hnterm
- Owner: ggerganov
- License: mit
- Created: 2019-12-31T08:57:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T16:39:09.000Z (5 months ago)
- Last Synced: 2024-10-03T13:51:12.788Z (3 months ago)
- Topics: hacker-news, news, terminal, tui
- Language: C++
- Homepage: https://hnterm.ggerganov.com
- Size: 792 KB
- Stars: 257
- Watchers: 5
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
#
[![Actions Status](https://github.com/ggerganov/hnterm/workflows/CI/badge.svg)](https://github.com/ggerganov/hnterm/actions)
[![HNTerm on Snapcraft](https://snapcraft.io//hnterm/badge.svg)](https://snapcraft.io/hnterm)
[![HNTerm v0.4 badge][changelog-badge]][changelog]
[![MIT License Badge][license-badge]][license]Browse [Hacker News](https://news.ycombinator.com/news) interactively in your terminal
[![hnterm-demo](https://asciinema.org/a/291253.svg)](https://asciinema.org/a/291253)
## Details
HNTerm is a small console application written in C++ for browsing [Hacker News](https://news.ycombinator.com/news). It queries the official [HN API](https://github.com/HackerNews/API) and interactively displays the current stories and comments. It uses `libcurl` to perform the GET requests to the API. The UI is rendered with [ImTui](https://github.com/ggerganov/imtui). HNTerm fetches only the content that is currently visible on the screen. The window splits allow browsing multiple stories/comment sections at the same time.
## Installing
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/hnterm)
### Linux
```bash
sudo snap install hnterm
```### Mac OS
```bash
brew install ggerganov/ggerganov/hnterm
```## Building from source
### Linux and Mac:
```bash
git clone https://github.com/ggerganov/hnterm --recursive
cd hnterm
mkdir build && cd build
cmake ..
make./bin/hnterm
```* Ubuntu 20.04 might need prerequisites: `sudo apt install cmake libncurses-dev libcurl4-openssl-dev`
### Emscripten:
```bash
git clone https://github.com/ggerganov/hnterm --recursive
cd hnterm
mkdir build && cd build
emconfigure cmake ..
make
```## Live demo in the browser
The Emscripten port of HNTerm uses Emscripten's Fetch API instead of `libcurl` to perform requests to the [HN API](https://github.com/HackerNews/API).
Demo: [hnterm.ggerganov.com](https://hnterm.ggerganov.com/) *(not suitable for mobile devices)*
[changelog]: ./CHANGELOG.md
[changelog-badge]: https://img.shields.io/badge/changelog-HNTerm%20v0.4-dummy
[license]: ./LICENSE
[version-badge]: https://img.shields.io/badge/version-0.4-blue.svg
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg