Giter Club home page Giter Club logo

instantnews's Introduction

instantnews

Get news instantly! ๐ŸŽถ ๐Ÿ“ฐ

Released v1.2.3

PyPI Gitter

Install

An API key from newsapi will be required and you can register for one here.

Using pip

$ pip install instantnews

Using pip upgrade

$ pip install instantnews --upgrade

Set your API key in an environment variable IN_API_KEY

For example:

export IN_API_KEY="<YOUR_API_TOKEN>"

Build from source

$ git clone https://github.com/shivam043/instantnews.git
$ cd instantnew
$ python setup.py install

Note:

Python 2.7 and Python 3 compatible

Usage

Get help

$ instantnews -h/--help  #Get Help
usage: instantnews [-h] [--show SHOW] [--show_all] [--news NEWS]

optional arguments:
  -h, --help            show this help message and exit
  --show SHOW, -s SHOW  Shows all the news channel codes category wise
  --show_all, -sa       Shows all the news channel codes
  --news NEWS, -n NEWS  Shows news

Get news-code category-wise/all

$ instantnews -sa/--show_all
forexample:
instantnews --show_all
News Code: <abc-news-au> ABC News (AU)
News Code: <al-jazeera-english> Al Jazeera English
News Code: <ars-technica> Ars Technica
News Code: <associated-press> Associated Press
News Code: <bbc-news> BBC News
News Code: <bbc-sport> BBC Sport
News Code: <bild> Bild
News Code: <bloomberg> Bloomberg
News Code: <breitbart-news> Breitbart News .....

$ instantnews -s/--show business
forexample:
instantnews --show business  # Categories available-'business','entertainment','gaming','general','music','politics','science-and-nature','sport','technology'
News Code: <bloomberg> Bloomberg
News Code: <business-insider> Business Insider
News Code: <business-insider-uk> Business Insider (UK)
News Code: <cnbc> CNBC
News Code: <die-zeit> Die Zeit
News Code: <financial-times> Financial Times
News Code: <fortune> Fortune
News Code: <handelsblatt> Handelsblatt

Get news

$ instantnews -n/--news  [news-id]
forexample:
instantnews --news bbc-news
[0] Title: Trump denies NFL kneel row race-related
Author: BBC News
Summary: Donald Trump says his words about political protests at sport events had "nothing to do with race".
--------------------------------------------
[1] Title: Germany's AfD to fight 'foreign invasion'
Author: BBC News
Summary: Nationalists lay out their plans after winning nearly 13% of the vote, weakening Chancellor Merkel.
--------------------------------------------
........
Want to see the news that interests you/open in a webpage? Enter Y/N # See news in a webpage by enter the number present in the box

License

Open sourced under MIT License

instantnews's People

Contributors

c-w avatar ghost-hacked avatar limitedatonement avatar shivam043 avatar

Watchers

 avatar  avatar

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.