Coder Social home page Coder Social logo

reesericci / hkkr.in Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nalinplad/hkkr.in

2.0 2.0 0.0 127 KB

๐Ÿ‘จโ€๐Ÿ’ป โ€ข CURL client for Hacker News ๐Ÿ“ฐ ๐Ÿ“ฐ

Home Page: https://hkkr.in

License: MIT License

JavaScript 100.00%

hkkr.in's Introduction

โš™๏ธ Hkkr.in ๐Ÿ—ž

The easiest way to get your daily hourly Hacker News dosage!

Uptime Robot status Uptime Robot ratio (7 days) GitHub GitHub stars
HKKRIN usage gif

Usage โ€ข Contributing โ€ข ToDo


Hkkr.in is a Curl client for Hacker News

I spend a lot of time in the terminal, and also lots of time on HN, so I made hkkr.in to make viewing HN in the terminal simple and accessible from any computer, not just ones that have HN CLI programs installed. I was inspired by the wttr.in which does a similar thing for the weather and for moon phases

If you want, you can donate to the project using the Sponsor button(at the top near the star and fork buttons), or by visiting this link. Tips will go towards hosting hkkr.in

Usage

Use curl hkkr.in/curlme to get similar info in the terminal

To get the top ten posts, run curl hkkr.in

A single result might look like this

1.  Bitwarden raises $100M
โžฅ    โ–ด646 โžค hkkr.in/32735479 (bitwarden.com)

It shows the title, votes, link to the discussion, and the domain of the url. Use the link on the bottom (hkkr.in/32735479) to visit that articles page on HN

You can pass some parameters to your request to alter the output(some parameter accept numbers as options, like curl hkkr.in/n10)

Parameter Function
n(number) Number of results to show(max 100)
m(number) Max width of titles
a Show all stories(max 100)

Contributing

Want to help out? If you have any ideas, bugs, or suggestions, please open an issue here

If you want to help develop the project, feel free to open a pull request. When you run npm start the program will listen on port 3050, which you can change with the PORT variable in app.js

I wrote most of the code here quickly and its not the greatest. I may come in and refactor some of it in the future.

ToDo

Planned features

  • Check user agent to serve an html version in the browser
  • Option to disable ANSI escapes incase a terminal emulator doesent support them
  • Show date on posts(EG: 4 days ago)
  • Option to sort by date
  • Option to make hkkr.in/{ID} links go directly to url not discussion
// Thanks for using hkkr.in

hkkr.in's People

Contributors

nalinplad avatar reesericci avatar

Stargazers

Roman avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.