The sys admin's daily grind: getnews.tech
Charly's Column – getnews.tech
Instead of websites or newsfeeds, Charly prefers to use getnews.tech at the command line to keep up to date with what's happening around the world quickly and in a targeted way.
When I want to keep up with what's happening in the world, I can check my favorite online newspapers or, if I'm in a hurry, use a news ticker. But what if I don't want to leave the command line to do that? I use getnews.tech
to fill this gap.
You can easily query getnews.tech
via the web using curl
. If you want to host it yourself to save data, you can find the code and installation instructions on GitHub [1]. You also need an API key from News API [2], which is free for private users, but you do need to register. News API serves as the actual data source, while getnews.tech
acts as the CLI wrapper to operate and sort and takes care of the human-readable output.
If I call
curl getnews.tech
without further parameters, I get the latest news from all over the world without further sorting. Doing this means that I have to put up with receiving news in languages I don't understand and in writing systems that mean nothing to me – Hebrew, for example (Figure 1), or Japanese kanji. I only know the kanji characters for man and woman, which I memorized in order to avoid using the wrong bathroom in my favorite sushi restaurant.
Fortunately, getnews.tech
offers various approaches to organizing this chaos. For example, I can prefix the URL with a country code to get news only in English (curl en.getnews.tech
) or exclusively in dozens of other languages. In addition, I can select my topics of interest. If I want to see the latest sports news, I append the parameter category=sports
. Besides sports
, getnews.tech
accepts the business
, entertainment
, general
, health
, science
, and technology
categories.
Lastly, I can specify the number of messages that I want getnews.tech
to show me at any given time. This is done by the n=<number>
parameter. To see the last two messages of the science
category from the English-language news stream (Figure 2), I would use the call from Listing 1.
Listing 1
Parameterized Call
$ curl en.getnews.tech/n=2,category=science
Infos
- getnews.tech: https://github.com/omgimanerd/getnews.tech
- News API: https://newsapi.org
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Linux Market Share Hits New High
For the first time, the Linux market share has reached a new high for desktops, and the trend looks like it will continue.
-
LibreOffice 24.8 Delivers New Features
LibreOffice is often considered the de facto standard office suite for the Linux operating system.
-
Deepin 23 Offers Wayland Support and New AI Tool
Deepin has been considered one of the most beautiful desktop operating systems for a long time and the arrival of version 23 has bolstered that reputation.
-
CachyOS Adds Support for System76's COSMIC Desktop
The August 2024 release of CachyOS includes support for the COSMIC desktop as well as some important bits for video.
-
Linux Foundation Adopts OMI to Foster Ethical LLMs
The Open Model Initiative hopes to create community LLMs that rival proprietary models but avoid restrictive licensing that limits usage.
-
Ubuntu 24.10 to Include the Latest Linux Kernel
Ubuntu users have grown accustomed to their favorite distribution shipping with a kernel that's not quite as up-to-date as other distros but that changes with 24.10.
-
Plasma Desktop 6.1.4 Release Includes Improvements and Bug Fixes
The latest release from the KDE team improves the KWin window and composite managers and plenty of fixes.
-
Manjaro Team Tests Immutable Version of its Arch-Based Distribution
If you're a fan of immutable operating systems, you'll be thrilled to know that the Manjaro team is working on an immutable spin that is now available for testing.
-
Nitrux 3.6.0 (“ie”) Available for Download and Install
The latest version of the systemd-free Linux distribution, Nitrux, has been released for general usage and includes the beta of the upcoming NVIDIA 560 graphics driver.
-
Vanilla OS 2 Orchid Available for Download
The latest iteration of Vanilla OS (Orchid) has been released and uses a hybrid Debian base.