Clinews - Read the latest news from the command line

terminalnews

Today let's talk about a great app which will help us keep abreast of the latest headlines from the comfort of our command line.

The utility that we are going to talk about today is named clinews which Used to read latest news and headlines from popular websites, blogs from the terminal.

This utility It will allow us to be informed of news of our interest, since it has the characteristic that we can filter the news by criteria that we indicate.

Thus Clinews will search for news in all sources that match the search criteria / term.

Between The principal caracteristics that we can find in Clinews are:

  • Limit the amount of news you want to see,
  • Sort news (top, latest, popular),
  • Show news stories in categories (for example, business, entertainment, games, general, music, politics, science & nature, sport, technology)

With Clinews you can read what is happening in the world directly from your Terminal. It is a free open source utility written with NodeJS.

How to install Clinews?

The first thing we must take into account is that Clinews, is written with NodeJS so we must have it installed on our system.

If you don't have it installed, just open a terminal and run the following command:

sudo apt-get install nodejs npm

With this we will already have NodeJS and the NPM package manager, now with the help of this we are going to install the application and in the same terminal we are going to execute the following command to install Clinews:

npm i -g clinews

Already done the installation of the application, now we must configure the API to obtain the metadata for headlines currently published in a variety of news sources and blogs.

It currently offers live headlines from 70 popular sources, including Ars Technica, BBC, Blooberg, CNN, Daily Mail, Engadget, ESPN, Financial Times, Google News, Hacker News, IGN, Mashable, National Geographic, Reddit r / all, Reuters, Speigel Online, Techcrunch, The Guardian, The Hindu, The Huffington Post, The Newyork Times, The Next Web, The Wall Street Journal, USA. and more.

In order to get this API we have to go to the following link and register for an account. https://newsapi.org/register

Once you have obtained the API key from the News API site, edit your file. bashrc:

sudo vi ~/.bashrc

Add the newsapi API key at the end as shown below:

export IN_API_KEY="-tu-API-key-"

Note that you must paste the key inside the double quotes. Save and close the file.

Once this is done, they must now execute the following command to update the changes.

sudo source ~/.bashrc

Now let's go ahead and find the latest headlines from new sources.

How to use Clinews?

news

To run this utility We must open a terminal and we are going to execute the following command in it, which we will accompany with the source of news of our interest.

news fetch google-news

Here in this quite practical example We are telling the application to get the last 10 headlines (by default) from the source “Google News. In addition, it shows a brief description of the news, the date and time published, and the actual link to the source.

To read a news item in your browser, hold down the Ctrl key and click on the URL. It will open in your default web browser.

Si they want to know information about the sources from which they obtain the information this app can run this command:

news sources

With which they will be listed and displayed in the terminal. Clinews lists all news sources, including news source name, id search, site description, website URL, and the country where it is located.

To search for any criteria in this application We do it with the following command:

news search "Linux"

And with this, the sources that contain news about this criterion will be displayed.

If you want to know a little more about the use of this application, you can run:

clinews -h

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.