retronews

a featureful fork of the luke8086/retronews hn+lobste.rs tui
Log | Files | Refs | README | LICENSE

README.md (2480B)


      1 # retronews
      2 
      3 A Python script for browsing [Hacker News](https://news.ycombinator.com/)
      4 and [Lobsters](https://lobste.rs/) discussions with a nostalgic interface emulating
      5 classical usenet and mail readers, like slrn and mutt.
      6 
      7 It was primarily written so I could highlight interesting threads and keep
      8 track of read / unread messages (see [blog post](https://luke8086.dev/retronews.html)).
      9 The UI showing one message at a time also encourages slower, more focused reading.
     10 
     11 On Unix-like systems it only depends on Python 3.9. On Windows you may also need
     12 to install [windows-curses](https://pypi.org/project/windows-curses/).
     13 
     14 It doesn't require installation. You can run it simply with:
     15 
     16 ```bash
     17 $ curl -LO https://raw.githubusercontent.com/luke8086/retronews/main/retronews.py
     18 $ python3 ./retronews.py
     19 ```
     20 
     21 Press `?` to see available keybindings.
     22 
     23 <img src="screenshot.png" width="600" />
     24 
     25 ## Customization
     26 
     27 To customize retronews without directly editing the script, you can put any valid
     28 Python code in `~/.retronewsrc.py` (or other location specified with `--rcfile`) to
     29 be executed on startup. For example:
     30 
     31 ```python
     32 # Ignore type warnings
     33 from typing import Any
     34 retronews: Any
     35 
     36 # Example: Custom key bindings
     37 retronews.KEY_BINDINGS[ord('a')] = lambda app: retronews.cmd_prev(app)
     38 retronews.KEY_BINDINGS[ord('z')] = lambda app: retronews.cmd_next(app)
     39 
     40 # Example: Custom colors
     41 retronews.COLORS['author'] = (retronews.curses.COLOR_RED, -1)
     42 ```
     43 
     44 ## Known issues and limitations
     45 
     46 - The reader is read-only, there are no plans to support voting and posting
     47 - Message formatting is not perfect, but works well enough most of the time
     48 - Detecting if threads contain unread responses works by only checking their
     49   count, it's not reliable if any responses were deleted
     50 
     51 ## Why not an NNTP gateway?
     52 
     53 NNTP doesn't support browsing threads by title (let alone paginated) and requesting
     54 their messages on demand. Clients need to fetch metadata of all available messages
     55 in all available threads in advance. Given the volume of messages on HN, synchronizing
     56 them to the gateway is not practical. Even when attempted, some clients struggle
     57 with the sheer number of messages in a single group.
     58 
     59 ## Related projects
     60 
     61 - [HN Search @ Algolia](https://hn.algolia.com/about) - The underlying API used to retrieve messages
     62 - [nntpit](https://github.com/taviso/nntpit) - An NNTP gateway to reddit.com
     63 - [circumflex](https://github.com/bensadeh/circumflex) - Another, more advanced TUI for HN