Skip to main content

A terminal-based HackerNews reader

Project description

OSHit -- Get your hit of the Orange Site in the terminal

Introduction

OSHit is a read-only terminal-based client for HackerNews. It provides the ability to view all the top/recent items in the major categories, as well as allowing viewing comments and user details. Where relevant, bindings are always available to open the relevant view on HackerNews itself in your web browser.

Please note that this client isn't designed to allow reading any and all stories on HackerNews, it's about reading what's current "hot" or new, within the categories provided by their API.

Installing

pipx

The package can be installed using pipx:

$ pipx install oshit

Homebrew

The package can be installed using Homebrew. Use the following commands to install:

$ brew tap davep/homebrew
$ brew install oshit

Running

Once installed run the oshit command.

Main features

When run up the opening display is a list of items, the initial list being the current top stories and jobs on HackerNews. Other lists available, via shortcut keys or via tabs at the top of the screen, are "New", "Best", "Ask", "Show" and "Jobs".

The main index

Pressing u when viewing a job or a comment will open a dialog that shows the details of the user who posted the item.

Viewing user details

When viewing a story or job and pressing c a dialog will open that will let you view and navigate its comments.

Viewing comments

Tweaking

Because of the nature of the HackerNews API there might be a need for you to dial in the ideal number of concurrent connections made to load up the data, and also the timeout for the connections. As of the time of writing the defaults are 50 concurrent connections and a timeout of 20 seconds.

If you run into problems press F11 and tweak the maximum concurrency and connection timeout values to taste (or look in ~/.config/oshit/configuration.json and change the "maximum_concurrency" and "connection_timeout" values).

Getting help

If you need help, or have any ideas, please feel free to raise an issue or start a discussion.

TODO

Things I'm considering adding or addressing:

  • Chill out on item loading (see #2)
  • Add a configuration dialog for the connection value tweaks.
  • Some degree of caching of items to reduce API hits.
  • Expand the text-cleaning code to handle links, etc.
  • Look at some "markup" of comments, eg: make quoted text more obvious.
  • Add searching
    • Amongst the current view
    • Amongst loaded comments within comment view
    • All of history (hn.algolia.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oshit-0.12.4.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

oshit-0.12.4-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file oshit-0.12.4.tar.gz.

File metadata

  • Download URL: oshit-0.12.4.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for oshit-0.12.4.tar.gz
Algorithm Hash digest
SHA256 d1f64893532f65643659c0f42840d2a64646e3f57e7397edcbc79c638b654fd5
MD5 78dcdb3e411be52d8f3948c4a66adae4
BLAKE2b-256 cce4a53a244655b68bdd073d5fd517373a67e9b9642cd15bb5fbf10e48344d38

See more details on using hashes here.

File details

Details for the file oshit-0.12.4-py3-none-any.whl.

File metadata

  • Download URL: oshit-0.12.4-py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for oshit-0.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2669eace9459e4f9264b435c446efe8f2dee5a0a5c6cd7f831a7eb2a39c969ec
MD5 6f1308c53ca187f7eda636350b263b2c
BLAKE2b-256 fde0935616648bded3267e1cf7c6756f58649c184968c42939031f0efcd6a546

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page