News
News is a logging and reporting tool for a fictional newspaper as part of the Udacity Full-Stack Web Development Nanodegree Program. As a tool it focuses on key insights into the backend database of the newspaper. These insights are provided by a set of database queries assembled together in the form of a command line tool.
Installation
First VirtualBox and Vagrant must be installed and configured.
Installing VirtualBox
VirtualBox can be downloaded from here. You do not need the extension pack or SDK and you do not need to launch VirtualBox as Vagrant will do that.
Installing Vagrant
Vagrant can be installed from here.
Configuring Vagrant
To configure vagrant, fork and clone this repository.
cd
in your terminal into this directory and inside you will find the vagrant
directory.
cd
again into that directory.
Running Vagrant
Run vagrant up
in your terminal to start the virtual machine. Once this is finished, run vagrant ssh
to
to connect to your vagrant.
Installing News
cd
into your vagrant
directory and then run
git clone https://github.com/TheGrandArchitect/news.git
in your terminal. You must have a copy of the newspaper database active in order to connect and run the queries successfully (See Below).
Database Setup
First, unzip the database file and
put this file which is called newsdata.sql
, into the vagrant
directory, which is shared with your vagrant virtual machine.
To load the data, cd
into your vagrant
directory and execute the command psql -d news -f newsdata.sql
. This command will
connect to and set up the database.
Usage
To run News, run the following command
python news.py
in your terminal. In order to run you must be in your vagrant
directory in your terminal and
have a recent version of python 3 installed.
License
News is distributed under the MIT License.