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>.

ActionWhat it does
top, best, new, ask, show, jobsList 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
menuOpen the menu, including Settings
clear-cacheClear cached stories. refresh is an alias
helpShow help

All of them are interactive, so they need a TTY.

Example

lla plugin run hackernews top

This prints a numbered list of stories, each with its title, domain, score, comment count, author and age.

lla plugin run hackernews comments -- 3

This 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.

KeyDefaultWhat it does
default_topic"Top"Topic for numbered actions: Top, Best, New, Ask, Show or Jobs
story_count30Stories to fetch. The menu accepts 5 to 100
cache_duration_secs300How 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.