- Push the Windows Key
- Type Environment Variables
- Click "Edit the system environment variables" to bring up System Properties, Advanced tab
- Click the "Environment Variables"" button
- Under "System variables"
- Add PYTHONPATH if it doesn't already exist
- Edit Path to include %PYTHONPATH%;%PYTHONPATH%\Scripts;
If the Path variables have been set, you should be able to use pip from the Windows command line. Press the Windows Key and r to bring up the Run Dialog and in the Open text box type: (Press the Enter key after each of the following)
cmd
pip install virtualenv
cd C:\Path\to\movieFinder
virtualenv venv
venv\scripts\activate
OS X comes with a version of Python already installed. These instructions will assume that the default Python install will be used.
- Toggle Spotlight by pushing the Command key and spacebar at the same time.
- Type Terminal and hit enter
- The Terminal should open up to your home directory, change directory to where you unzipped the project or want to install.
- If you have git installed, then you can clone the project via the command
git clone https://github.com/frost-byte/movieFinder.git
- Next, enter the following commands:
sudo easy_install pip
sudo pip install virtualenv
cd movieFinder
virtualenv venv
source venv/bin/activate
The command prompt will change from 'c:\path\to\movieFinder>' to '(venv) c:\path\to\movieFinder'
Make sure virtualenv is activated (see above)
pip install omdb
pip install xmltodict
pip install flask
For Mac OS X, you might need to preface the above commands with sudo.
sudo pip install omdb
sudo pip install xmltodict
sudo pip install flask
From the Windows command prompt ( or OS X Terminal ) make sure you're in the project directory with virtualenv activated.
Run the following command: python entertainment_center.py
Several messages should appear indicating that the server is running on the localhost and port 5000. http://127.0.0.1:5000
A browser window should then open and the site should appear.
- Python 2.7
- pip
- Flask
- xmltodict
- omdb
- Sphinx
- flake8
- Virtualenv
##References
###Code Documentation
Documentation for the modules was generated using Docstrings and Sphinx.
Daler's Guide to Publishing Sphinx Generated Docs to github
Simplifies using your Sphinx generated docs on your project's github.io page.
reStructured Text Primer
Detailed guide for the .rst markdown format used by Sphinx.
Python Documentation Guide
General guide covering various tools to document Python code, including Sphinx.
First Steps with Sphinx
How to get Sphinx setup and running.
PEP 0257 Docstring Conventions
Guidelines for using Docstrings to document your python source code.
Documenting your Project using Sphinx
More insights about Sphinx.
A semi-automatic way for Sphinx to Document using Docstrings
This is by far the easiest way to quickly document your modules, classes and methods.
###Code Formatting
Pep8 Online
An online python formatting tester.
Flake8
A Handy, command line tool for checking the formatting of your python code.
###Code Attributions
Python Tricks: Accessing Dictionary Items as Object Attributes by Senko Rašić
Used his method of creating a python object from a dictionary by assigning the dictionary to the object's dict attribute.
How to Check if an Enter Key is Pressed with jQuery by mkyong
Checking for the Enter key's keycode in an event using jQuery.
What is the easiest way to disable/enable buttons and links (jQuery + Bootstrap) answer from oikonomopo
Technique for disabling a Bootstrap button using jQuery.
###Movie APIs
Jayaprakash Garaga, Grand Valley State University, Personalized Movie Database System
This was very useful for understanding and learning about some of the APIs available for web sites and services for Movies.
TrailerAddict.com API
Offers a way to allow the user to select a movie and then assign a trailer programmatically. The Simple API was used in this project.
OMDB Api
The online specification and reference for the Open Movie Database API.
###Other API and Coding References
Stack Overflow
A go to resource for solving all problems related to coding.
W3Schools
Great reference for all languages and specifications for programming web based content. HTML, CSS, jQuery, Javascript...
jQuery API
The definitive javascript library for interacting with the Document Object Model (DOM).
Bootstrap
The javascript and css library of gui elements.
###Python
Derrick Gilland's Python OMDB Api Wrapper
User search's for movies generate a list of titles by querying the OMDB Api.
Martín Blech's xmltodict Python Module
Takes the xml file retrieved using the TrailerAddict SimpleAPI and converts it into a python dictionary.
Flask - "A micro webdevelopment framework for Python"
Runs the web server that handles user requests for searching movies and adding them to the list of favorites. Leverages the OMDB and TrailerAddict.com Api's to dynamically update the list of favorite movies.
The Traveling Coder - Building Websites in Python with Flask
A handy tutorial and reference.
Virtualenv
A python module for creating Virtual Environments for Python projects.
Python-Guide.org Virtualenv Guide
Encapsulates a Python projects third party module dependencies into an environment which can be per project.
###Markdown
Markdown Here
Daring Fireball - Markdown Basics
Adam P's Markdown Cheatsheet
Three guides that are extremely useful when trying to create styled documents. In particular, this README file.
Online Markdown Editor
Incredibly useful for troubleshooting and learning markdown.