Broadsheet

License: GPL v3

Broadsheet allows you to check world news anywhere, anytime – from the comfort of your own terminal.

Broadsheet

Table of Contents

Getting Started

Usage

There are only three arguments you need to pass to Broadsheet.

  • The “query”:

    • In modes -q and -qt, the query serves as the word(s) to search for in the articles.
    • In mode -d, it specifies the domain to pull articles from.
    • In mode -c, it specifies the country to search top headlines from.
  • The “language”, which is optional.

    • If no language is passed, it reads a default from the config file (Currently it’s -en, English, but you can change it).
  • The “mode”, which is optional.

    • If no mode is specified it will be defaulted to whatever the default is in the config file (Currently it’s -q, Keyword mode, but you can change it).

    Mode Description Example
    Search for articles containing a word. broadsheet -q education
    Search for articles containing a word only in the title. broadsheet -qt covid
    Get articles from domain. broadsheet -d cnbc.com
    See top headlines for country. broadsheet -c us

Getting the source

$ git clone https://github.com/i-am-the-gabe/Broadsheet

Building

  1. After getting the source, make a build directory.

    $ cd Broadsheet

    $ mkdir build/

  2. Copy the config file from src/broadsheet_conf into ~/.broadsheet_conf (notice the dot – the new config file will be a hidden file).

    $ cp src/broadsheet_conf ~/.broadsheet_conf

  3. Run CMake, and then make install for Broadsheet and its dependencies.

    $ cd build

    $ cmake ../src && sudo make install

    • There’s a good chance it will hang for some time, while it handles OpenSSL. This is normal.

Once it’s done, build should look somewhat like this:

Broadsheet

To finish setting it up, edit ~/.broadsheet_conf and follow the instructions there.

If you want to run Broadsheet from anywhere (which is recommended), then go into build and run pwd on your terminal. Copy the output, and then paste the following into your .bashrc:

alias broadsheet [PASTE PWD OUTPUT HERE]/broadsheet. This will make it so you can run Broadsheet as broadsheet in your terminal from anywhere.

Dependencies

CMake should be able to handle libcpr and nlohmann-json.
If it isn’t, or if you want to do it yourself, follow their respective installation instructions.

If you run Arch Linux, or anything similar, you’re in luck: you can download libcpr from AUR and nlohmann-json via Pacman.

Prerequisites

  • CMake 3.14 or greater.
  • Virtually any modern GNU/Linux distribution.
  • Compiler with support for C++11 or greater.

Roadmap

  • Add RSS news support instead of relying on newsapi.org.
  • Rethink the build process.
    • There are issues regarding packaging Broadsheet for the AUR, stemming from CMake installing the dependencies on its own.
  • Rewrite this README.

Broadsheet

GitHub

View Github