Plugin catalog
hackernews
Lists Hacker News stories in your terminal and opens them or their comments in your browser.
↓ on this page
hackernews lists Hacker News stories in your terminal and opens them or their comments in your browser. Reach for it when you want to scan the front page from where you're working.
Actions
Run an action with lla plugin run hackernews <action>.
| Action | What it does |
|---|---|
top, best, new, ask, show, jobs | List stories for that topic. newest is an alias for new |
open -- <n> | Open a story in your browser |
comments -- <n> | Open a story's comments in your browser |
copy -- <n> | Copy a story's URL |
browse [-- <topic>] | Browse a topic interactively |
menu | Open the menu, including Settings |
clear-cache | Clear cached stories. refresh is an alias |
help | Show help |
All of them are interactive, so they need a TTY.
Example
lla plugin run hackernews topThis prints a numbered list of stories, each with its title, domain, score, comment count, author and age.
lla plugin run hackernews comments -- 3This opens the third story's comments in your default browser.
Settings
Change these under menu, then Settings. They're stored in ~/.config/lla/plugins/hackernews/config.toml, along with the cached stories.
| Key | Default | What it does |
|---|---|---|
default_topic | "Top" | Topic for numbered actions: Top, Best, New, Ask, Show or Jobs |
story_count | 30 | Stories to fetch. The menu accepts 5 to 100 |
cache_duration_secs | 300 | How long to reuse fetched stories. The menu accepts 30 to 3600 |
Permissions
The plugin can reach hacker-news.firebaseio.com and news.ycombinator.com, and use the clipboard and open URLs.