This github action periodically polls hacker news for stories appearing on the front page, then sends you an email of the day's best stories.
- The action is used in a workflow configured to collect stories on a schedule (e.g every hour) which it puts in the
story
table in the database. - On every run the current top stories are upserted, with their scores and comment counts continuously updated.
- Then after each run, if the current time is after the
next_send
time in theconfig
table the top stories are queried and sent to the emails set inconfig
andnext_send
is incremented. - The metric for ranking the best stories is combined percentile rank of score and number of comments for stories collected since the last send.
- A fork of this repo or a github project configured to use this action.
- A postgres database (e.g. a free neon instance)
- A Mailgun account for sending email.
TODO