diff --git a/README.md b/README.md index 36ae53b62..747ab39dd 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,41 @@ -# ud036_StarterCode -Source code for a Movie Trailer website. +# Movie Trailer Center +This project is used to create a website displaying all of your favoite movies. It allows the user to click a movie poster displayed on the site and plays the movie's trailer. + +## Geting Started +The instructions given below will help you setup The Movie Trailer project on your local machine. All requirements including software installations needed to run this project will be mentioned in this guide. + +### Prerequisites +To run this program, you'll first need to install python. Visit https://www.python.org/ and download the latest version of python. + +Once installation is done, type the following command in a command line window: "python". You should see an output like the one below + +``` +Python 2.7.13 (v2.7.13:, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 +Type "help", "copyright", "credits" or "license" for more information. +``` + +### Installing +To get the project's files, you can clone the repo [here](https://github.com/nanatech/Movie_TrailerCenter/tree/movie_branch) or you can download the zip file. + +Once you have the project setup you should have a directory that looks like the following: + +>/pics +README.md +entertainment_center.py +fresh_tomatoes.html +fresh_tomatoes.py +fresh_tomatoes.pyc +media.py +media.pyc + +## Modifying Files +By default the project is setup to display my favorite movies. To display your favorite movies instead modify the "entertainment_center.py"file in your Python IDLE editor. +> You will notice that this file stores an array of the movies specified at the beginning of the file. This array is then used by the open_movies_page() method. This method is called from the fresh_tomatoes module, which is the file that renders a html page to display all of your favorite movies. + +If your are familiar with HTML and would like to chnage the style of the HTML page rendered from the fresh_tomatoes.py module, feel free to modify this file as well. + +## Running the Program +Now that you have added your favorite movies in the entertainment_center.py file, go ahead and run the program by clicking Run --> Run Module or by clicking F5 on the keyboard in your python IDLE. + +## Acknowledgments +Thanks to Udacity Nanodegree program for providing a starter code repository that contains the main code to generate the movie site. Repository found [here](https://github.com/adarsh0806/ud036_StarterCode) \ No newline at end of file diff --git a/entertainment_center.py b/entertainment_center.py new file mode 100644 index 000000000..150391463 --- /dev/null +++ b/entertainment_center.py @@ -0,0 +1,34 @@ +import media +import fresh_tomatoes + +"""The entertainment center module is used to initalize instance of the Movie class""" + + +toy_story = media.Movie("Toy Story", + "A story of a boy and hist toys that come to life", + "pics//toystory.jpeg","https://youtu.be/KYz2wyBy3kc") + +home_alone = media.Movie("Home Alone", + "An eight-year-old is accidentally left home alone by his family", + "pics//homeAlone.jpg", "https://www.youtube.com/watch?v=CK2Btk6Ybm0") + +princess_frog = media.Movie("Princess & The Frog", + "A story of a disnet princess and a prince frog", + "pics//PAF.jpg", "https://www.youtube.com/watch?v=uQBy6jqbmlU") +it = media.Movie("IT", "Stephen Kings horror Classic", + "pics//It.JPG", "https://www.youtube.com/watch?v=FnCdOQsX5kc") +think_like_a_man = media.Movie("Think Like A Man", + "Based on Steve Harvey's best selling book 'Think Like A Man' ", + "pics//thinkLAM.jpg", "https://www.youtube.com/watch?v=F7VmU8aHAtw") +scream = media.Movie("Scream","A horror classic.","pics//scream.jpg", + "https://www.youtube.com/watch?v=AWm_mkbdpCA") + +#Create an array of the movie objects created +movies = [toy_story, home_alone, princess_frog, it, think_like_a_man, scream] + +# This method passes the movie array as an argument to the +# open_movies_page() method. This method is called from the +# fresh_tomatoes module which which will create a HTML file +# that will display all movies listed in the movie array +fresh_tomatoes.open_movies_page(movies) + diff --git a/fresh_tomatoes.html b/fresh_tomatoes.html new file mode 100644 index 000000000..7cd2e38de --- /dev/null +++ b/fresh_tomatoes.html @@ -0,0 +1,143 @@ + + + +
+ +