Coder Social home page Coder Social logo

ryan-ryu8 / newsapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emdeechege/newsapi

0.0 0.0 0.0 41 KB

A news application application that helps list and preview news articles from various sources as well as display current headlines on home page..

Home Page: https://emdeenews.herokuapp.com/

Python 69.22% HTML 29.70% CSS 0.68% Shell 0.39%

newsapi's Introduction

Habari.. Chap Chap

Built By Tom Chege

Description

Habri.. Chap chap is a web application that displays a list of various news sources. On choosing a news source, it will preview the top news articles of the day. Clicking a news article will redirect the user to read it fully from the news source. It achieves this by using the News API.

You can view the site at:Heroku

User Stories

These are the behaviours/features that the application implements for use by a user.

As a user I would like to:

  • See various news sources
  • Select the ones they prefer
  • See the top news articles from that news source
  • See the image, description and time the news article was created
  • Click on an article and read it fully from the news source

Specifications

Behaviour Input Output
Display news sources On page load List of various news sources is displayed in a list
Display tabs with news by category On Tab link click Clickable links to open news based on category
Display articles from a news source Click a news source Redirected to a page with articles from the source
Display the preview of an article On page load Each article displays an image,description and publication date
To Read an entire article Click an article Redirected to the news source's site to read the entire article

SetUp / Installation Requirements

Prerequisites

  • python3.6
  • pip
  • virtualenv

Cloning

  • In your terminal:

      $ git clone https://github.com/emdeechege/NewsApi/
      $ cd NewsPI
    

Running the Application

  • Creating the virtual environment

      $ python3.6 -m venv --without-pip virtual
      $ source virtual/bin/env
      $ curl https://bootstrap.pypa.io/get-pip.py | python
    
  • Installing Flask and other Modules

      $ python3.6 -m pip install Flask
      $ python3.6 -m pip install Flask-Bootstrap
      $ python3.6 -m pip install Flask-Script
    
  • Setting up the API Key

      To be able to gather article info from the News API you will need an API Key.
    
      * Visit https://newsapi.org/ and register for an API key.
      * In the root directory of the project folder create a file: start.sh
      * Insert the following info into it:
    
              export NEWS_API_KEY='<Your-Api-Key>'
              python3.6 manage.py server
    
      * Insert the API Key you received from News Api where <Your-Api-Key> is.
    
  • To run the application, in your terminal:

      $ chmod +x start.sh
      $ ./start.sh
    

Testing the Application

  • To run the tests for the class files:

      $ python3.6 manage.py tests
    

Technologies Used

  • Python3.6
  • Flask

License

Copyright (c) 2018 emdeechege


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

newsapi's People

Contributors

emdeechege 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.