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
The package can be installed using pipx:
$ pipx install oshit
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".
Pressing u when viewing a job or a comment will open a dialog that shows the details of the user who posted the item.
When viewing a story or job and pressing c a dialog will open that will let you view and navigate its 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 look in ~/.config/oshit/configuration.json and
change the "maximum_concurrency" and "connection_timeout" values to
taste.
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)
Release files for oshit 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| oshit-0.11.1.tar.gz | 24.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| oshit-0.11.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.7 kB
Release files / oshit-0.11.1.tar.gz
| Download URL | oshit-0.11.1.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d4b70c03fc18d81b786c832ac015a9b7252b98403ea71f47c4992d58f30aa29
|
|
BLAKE2b-256 checksum How to use checksums |
bda7c15c25f6acda5e011857a7f22008d8136e5ab229438d9dbaecb2c3468c7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / oshit-0.11.1-py3-none-any.whl
| Download URL | oshit-0.11.1-py3-none-any.whl |
|---|---|
| Size | 34.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c8fee2dab5660054e6be9825ff096ca3f9c4c59c5125d994685ef6df25b912d
|
|
BLAKE2b-256 checksum How to use checksums |
bdbe927ab8452b2ec754cb85edb618bac68eed43c24432ed3ac16fe644b74569
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|