If you are a command-line addict like me, then you would always want to do everything such as controlling your Linux systems (local or remote), programming, searching Google using Googler, playing text-based games, reading your favorite news and much more from within a terminal window.
Okay, Linux newbies (or possibly any other Linux users out there) are probably asking, “how can i get latest news from the command-line?” In this article, we are going to show you how to do this using Newsroom (similar to Newsboat – a RSS/Atom Feed reader for Linux console).
Read Also: Cricket-CLI – Watch Live Cricket Scores in Linux Terminal
Newsroom is a simple, free open-source modern command-line tool to get your favorite news in Linux. It is developed using JavaScript (NodeJS to be specific), so it is cross-platform and runs on Linux systems, Mac OSX as well as Windows.
The default newsroom sources are: hackernews, techcrunch, inside, bnext, ithome, wanqu, nodeweekly, codetengu and gankio. You can configure your own sources via OPML (Outline Processor Markup Language) – an XML-based format designed for exchange of outline-structured information between applications running on different operating systems and environments.
Requirements:
- NPM – Default NodeJS package manager; you can install NodeJS and NPM at once on your Linux system.
How to Install Newsroom in Linux Systems
Once you have NPM installed on your system, you install newsroom with root privileges using the sudo command, as follows (the -g
switch means install globally: to be used by all users on the system):
$ sudo npm install -g newsroom-cli
Once you have successfully installed newsroom, the CLI will register the newsroom and nr commands in your shell. You can start using it as follows, it will take you to an interactive command line interface where you can choose your news source:
$ newsroom
News Sources
Use the Up and Down arrows to select a news source from a list of predefined sources, as shown below.
Select News Source
After choosing a news source, all news titles will be shown as in the following screen shot, then you can select an item by pressing the Space bar, after making a selection, the item will be indicated by a green colored bullet, as shown in the screen shot below. You can press Enter to read it in detail from a web browser.
Select News Topic
To terminate the command-line, type [Ctrl+C].
You can also provide the source you want to get news from and the number of news items to be displayed as shown.
$ newsroom [news_source] [number_of_news_items]
For example:
$ newsroom hackernews 3
Last but not least, you can also use your own awesome OPML file, as follows. This way, you can add your own news sources such as tecmint.com, fossmint.com, etc.
$ newsroom -o <your-awesome-list.opml>
To view the newsroom help message, use the command below.
$ newsroom --help
For more information check out Newsroom Github repository and learn how to create OPML file.
Newsroom is a great way to get your favorite news in Linux on the command-line. Try it out and share your thoughts about it, with us via the feedback form below.
Source: tecmint.com