Code Monkey home page Code Monkey logo

getnews.tech's Introduction

getnews.tech

Powered by the News API

omgimanerd:~$ curl getnews.tech/trump
┌────────────────────────────────────────────────────────────────────────┐
│ Articles                                                               │
├────────────────────────────────────────────────────────────────────────┤
│ Huawei, Saudi Arabia, India: Your Thursday Briefing                    │
│ Published on Feb 20th, 2019 at 2:41pm EST                              │
│ President Trump boarding Air Force One last week.                      │
│ http://getnews.tech/s/7TYAJvAH                                         │
├────────────────────────────────────────────────────────────────────────┤
│ Trump Organization shelves plans for two new US hotel chains           │
│ Published on Feb 14th, 2019 at 7:07pm EST                              │
│ The Trump Organization will not move forward with ambitious            │
│ expansion plans for two hotel chains across the US, citing a toxic     │
│ political climate for the Trump brand.                                 │
│ http://getnews.tech/s/DGVGiZTO                                         │
├────────────────────────────────────────────────────────────────────────┤
│ Trump Loves a Culture War                                              │
│ Published on Feb 6th, 2019 at 2:36pm EST                               │
│ The president lied about abortion in the State of the Union.           │
│ http://getnews.tech/s/UrIzR005                                         │
├────────────────────────────────────────────────────────────────────────┤
│ Trump Versus the Socialist Menace                                      │
│ Published on Feb 7th, 2019 at 7:05pm EST                               │
│ President Trump giving his State of the Union address on Tuesday.      │
│ http://getnews.tech/s/_1CQRCZd                                         │
├────────────────────────────────────────────────────────────────────────┤
│ Trump-Kim Meeting, Brexit, Pulwama: Your Wednesday Briefing            │
│ Published on Feb 26th, 2019 at 2:16pm EST                              │
│ President Trump arriving in Hanoi, Vietnam.                            │
│ http://getnews.tech/s/g1YFW5W5                                         │
├────────────────────────────────────────────────────────────────────────┤
│             Powered by the News API (https://newsapi.org).             │
│               Follow @omgimanerd on Twitter and GitHub.                │
│                 Open source contributions are welcome!                 │
│               https://github.com/omgimanerd/getnews.tech               │
└────────────────────────────────────────────────────────────────────────┘

This is a web server that formats the news (primarily US based) from various sources on the web for display in the terminal. A link to each article is included if you want to read the full article.

Usage

You can fetch the latest news simply by typing

curl getnews.tech
curl us.getnews.tech/trump
curl fr.getnews.tech/world+cup
curl gr.getnews.tech/category=business

For additional options:

curl getnews.tech/:help

Contributing

Fork this repository and send me a pull request with any suggestions and changes. Use ESLint to format your JavaScript using the provided .eslintrc.js file. I highly recommend using the provided precommit hook to run the unit tests and ESLint.

ln -s ../../pre-commit.sh .git/hooks/pre-commit

You will need to acquire an API Key from the News API. Add them to your .bashrc or other environment variable configuration:

export NEWS_API_KEY=YOUR_KEY_HERE

Install the project dependencies:

npm install

Run the server:

node server.js

License

Apache 2

getnews.tech's People

Contributors

dependabot[bot] avatar omgimanerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

getnews.tech's Issues

Language support

As suggested by @chubin, use a language specific subdomain to do language support.

curl es.getnews.tech/topic

Languages supported:
image

/help: blue text is not readable

I have checked the new /:help page, it is very cool, but I would suggest several improvements:

  1. Blue text is unreadable on black background (at least on my terminal, and I have pretty default settings i.e. many others will have this problem too)
  2. Valid countries are highlighted, and valid categories not; it would be better to make it consistent
  3. Would it be possible to make time direction configurable (top -> down, blogstyle or down -> top, log style)?

And the last but not least, strange, maybe you've changed something in the search algorithm, but now it is impossible to find anything related to programming languages news.
I tried to search for rust, elm, python and the service delivered Trump raised Biden with Xi etc. But I think that it is just some configuration bug, and you will fix it soon.

Help page

As suggested by @chubin, use
curl getnews.tech/:help
to display a help page.

Is getnews.tech down?

When I try curl getnews.tech/anything, I now get an error:

curl getnews.tech/ <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>

How to get plain text?

Is there a url I can hit to get plain text news? Without the shell formatting like

[39m

Too many requests

Getting the following error when calling service:

You have made too many requests recently. Developer accounts are limited to  │
│  100 requests over a 24 hour period (50 requests available every 12 hours).  │
│           Please upgrade to a paid plan if you need more requests.           │
│   

curl getnews.tech not working anymore

It seems that this is not working anymore:

curl getnews.tech/anything returns the following:

<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>

Server down ?

{20-03-17 7:13}manjaro:~ martin% curl getnews.tech
┌──────────────────────────────────────────────────────────────────────────────┐
│ │
│ An error occurred on our end. Please try again later. │
│ │
│ curl getnews.tech/:help │
│ │
├──────────────────────────────────────────────────────────────────────────────┤
│ Powered by the News API (https://newsapi.org). │
│ Follow @omgimanerd on Twitter and GitHub. │
│ Open source contributions are welcome! │
https://github.com/omgimanerd/getnews.tech
└──────────────────────────────────────────────────────────────────────────────┘

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.