From d4b612ffbdea468777d7cb7aa8446869a1265b5a Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 16:28:26 -0400 Subject: [PATCH 01/10] Update README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36ae53b6..d41ff858 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,20 @@ -# ud036_StarterCode -Source code for a Movie Trailer website. +# My Fabulous Recipe + +This recipe for **cereal and milk** has been passed down my family for months. + +## Ingredients + +* Cereal (you can find cool cereals [here](www.example.com/coolcereals)) + +* Milk + +## Directions + +If I were writing these out as _code_, it might look something like this: + +``` +if bowl is empty: + add cereal +if bowl only has cereal in it: + add milk +``` From 90ed1b5271ee5da3ba23397ff96d4e4b08549b68 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 16:40:09 -0400 Subject: [PATCH 02/10] Update README.md --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d41ff858..d53b16ab 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -# My Fabulous Recipe +# Movie Trailer Website -This recipe for **cereal and milk** has been passed down my family for months. +**Movie Trailer Website** is a project that has been written for **Udacity's Full Stack Developer Nanodegree Program**. -## Ingredients +In this project, it will display six of my favorite movies that I have selected. When the image of the movie is clicked, the corresponding movie trailer shall display via youtube. + +## Installation * Cereal (you can find cool cereals [here](www.example.com/coolcereals)) @@ -18,3 +20,6 @@ if bowl is empty: if bowl only has cereal in it: add milk ``` + +## License +The contents of this repository is covered by [UNLICENSED] From b943a881c6b937f8470d2f6c82b859edf84592c0 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 16:41:04 -0400 Subject: [PATCH 03/10] Create UNLICENSE --- UNLICENSE | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 UNLICENSE diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 00000000..fdddb29a --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to From 1db69019a9681b424e30b75313fcb6bf076f5d49 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:15:51 -0400 Subject: [PATCH 04/10] Update README.md --- README.md | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d53b16ab..3418a5c2 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,37 @@ **Movie Trailer Website** is a project that has been written for **Udacity's Full Stack Developer Nanodegree Program**. -In this project, it will display six of my favorite movies that I have selected. When the image of the movie is clicked, the corresponding movie trailer shall display via youtube. +In this project, the webpage will display six of my favorite movies that I have selected. When the image of the movie is clicked, the corresponding movie trailer shall display via youtube. -## Installation +## Requirments -* Cereal (you can find cool cereals [here](www.example.com/coolcereals)) +Please ensure your system contains the following software prior to using this project: -* Milk +* [Python 2.7](https://www.python.org/download/releases/2.7/) -## Directions +## Download -If I were writing these out as _code_, it might look something like this: +To obtain a copy of this project download the entire contents of this repository in a `.zip` file onto your desktop or folder of choice and unzip it there. -``` -if bowl is empty: - add cereal -if bowl only has cereal in it: - add milk -``` +## Usage + +**1) Open command prompt or terminal.** + +**2) Navigate to the folder where the files are unzipped at.** + +`cd ` + +**3) Open the project.** + +`python entertainment_center.py` + +## Source + +Majority of this project has been written during the **Programming Fundamentals and the Web** section of the Nanodegree Program. With that said, this project's source code will be similar, if not almost identical, to the structure of the example provided by the Nanodegree Program. No plagarism or copyright infringement was inteneded during the production of this project. + +## Disclaimer + +Please use this project at your own risk. I, _J. Ye._, am not responsible for any damage(s) that the end-user's computer may experience while using this project. ## License -The contents of this repository is covered by [UNLICENSED] +The contents of this repository is covered by [UNLICENSE](github.com/jye0325/ud036_StarterCode/UNLICENSE) From 0a05c8ec6685f5af4b1b99ab4a207f25cf927f72 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:17:28 -0400 Subject: [PATCH 05/10] Add files via upload --- entertainment_center.py | 47 +++++++++++++++++++++++++++++++++++++++++ media.py | 16 ++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 entertainment_center.py create mode 100644 media.py diff --git a/entertainment_center.py b/entertainment_center.py new file mode 100644 index 00000000..a965097f --- /dev/null +++ b/entertainment_center.py @@ -0,0 +1,47 @@ +import fresh_tomatoes +import media + +toy_story = media.Movie("Toy Story", + "A story of a boy and his toys that come to life", + "http://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg", + "https://www.youtube.com/watch?v=vwyZH85NQC4") +#print(toy_story.storyline) + +avatar = media.Movie("Avatar", + "A marine on an alien planet", + "http://upload.wikimedia.org/wikipedia/id/b/b0/Avatar-Teaser-Poster.jpg", + "https://www.youtube.com/watch?v=-9ceBgWV8io") +#print(avatar.storyline) +#avatar.show_trailer() + +school_of_rock = media.Movie("School of Rock", + "Storyline", + "https://upload.wikimedia.org/wikipedia/en/1/11/School_of_Rock_Poster.jpg", + "https://www.youtube.com/watch?v=3PsUJFEBC74") + +ratatouille = media.Movie("Ratatouille", + "Storyline", + "https://upload.wikimedia.org/wikipedia/en/5/50/RatatouillePoster.jpg", + "https://www.youtube.com/watch?v=c3sBBRxDAqk") + +midnight_in_paris = media.Movie("Midnight in Paris", + "Storyline", + "https://upload.wikimedia.org/wikipedia/en/9/9f/Midnight_in_Paris_Poster.jpg", + "https://www.youtube.com/watch?v=atLg2wQQxvU") + +hunger_games = media.Movie("Hunger Games", + "Storyline", + "https://upload.wikimedia.org/wikipedia/en/4/42/HungerGamesPoster.jpg", + "https://www.youtube.com/watch?v=PbA63a7H0bo") +""" +batman = media.Movie("The Dark Knight", + "Batman vs. Joker", + "https://upload.wikimedia.org/wikipedia/en/8/8a/Dark_Knight.jpg", + "https://www.youtube.com/watch?v=_PZpmTj1Q8Q") +batman.show_trailer() +""" + +movies = [toy_story, avatar, school_of_rock, ratatouille, midnight_in_paris, hunger_games] +fresh_tomatoes.open_movies_page(movies) +#print(media.Movie.VALID_RATINGS) +#print(media.Movie.__doc__) diff --git a/media.py b/media.py new file mode 100644 index 00000000..0c9277ef --- /dev/null +++ b/media.py @@ -0,0 +1,16 @@ +import webbrowser + +class Movie(): + """ This class provides a way to store movie related information""" + + VALID_RATINGS = ["G", "PG", "PG-13", "R"] + + def __init__(self, movie_title, movie_storyline, poster_image, + trailer_youtube): + self.title = movie_title + self.storyline = movie_storyline + self.poster_image_url = poster_image + self.trailer_youtube_url = trailer_youtube + + def show_trailer(self): + webbrowser.open(self.trailer_youtube_url) From 60e8dc491a22210b8b31393f703179860c327426 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:19:29 -0400 Subject: [PATCH 06/10] Update media.py --- media.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/media.py b/media.py index 0c9277ef..dfa8c3c0 100644 --- a/media.py +++ b/media.py @@ -1,14 +1,10 @@ import webbrowser class Movie(): - """ This class provides a way to store movie related information""" - VALID_RATINGS = ["G", "PG", "PG-13", "R"] - - def __init__(self, movie_title, movie_storyline, poster_image, + def __init__(self, movie_title, poster_image, trailer_youtube): self.title = movie_title - self.storyline = movie_storyline self.poster_image_url = poster_image self.trailer_youtube_url = trailer_youtube From dfb46b9f8f542efd6ad5eed38a14946918e3a050 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:28:02 -0400 Subject: [PATCH 07/10] Update entertainment_center.py --- entertainment_center.py | 45 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/entertainment_center.py b/entertainment_center.py index a965097f..88ad02d6 100644 --- a/entertainment_center.py +++ b/entertainment_center.py @@ -1,47 +1,18 @@ import fresh_tomatoes import media -toy_story = media.Movie("Toy Story", - "A story of a boy and his toys that come to life", - "http://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg", - "https://www.youtube.com/watch?v=vwyZH85NQC4") -#print(toy_story.storyline) +terminator_2 = media.Movie("Terminator 2", + "https://upload.wikimedia.org/wikipedia/en/8/85/Terminator2poster.jpg", + "https://www.youtube.com/watch?v=VVZQ39i5G1s") -avatar = media.Movie("Avatar", - "A marine on an alien planet", - "http://upload.wikimedia.org/wikipedia/id/b/b0/Avatar-Teaser-Poster.jpg", - "https://www.youtube.com/watch?v=-9ceBgWV8io") -#print(avatar.storyline) -#avatar.show_trailer() +inception = media.Movie("Inception", + "https://upload.wikimedia.org/wikipedia/en/2/2e/Inception_%282010%29_theatrical_poster.jpg", + "https://www.youtube.com/watch?v=W7OTkEY1tMI") -school_of_rock = media.Movie("School of Rock", - "Storyline", - "https://upload.wikimedia.org/wikipedia/en/1/11/School_of_Rock_Poster.jpg", - "https://www.youtube.com/watch?v=3PsUJFEBC74") - -ratatouille = media.Movie("Ratatouille", - "Storyline", - "https://upload.wikimedia.org/wikipedia/en/5/50/RatatouillePoster.jpg", - "https://www.youtube.com/watch?v=c3sBBRxDAqk") - -midnight_in_paris = media.Movie("Midnight in Paris", - "Storyline", - "https://upload.wikimedia.org/wikipedia/en/9/9f/Midnight_in_Paris_Poster.jpg", - "https://www.youtube.com/watch?v=atLg2wQQxvU") - -hunger_games = media.Movie("Hunger Games", - "Storyline", - "https://upload.wikimedia.org/wikipedia/en/4/42/HungerGamesPoster.jpg", - "https://www.youtube.com/watch?v=PbA63a7H0bo") -""" batman = media.Movie("The Dark Knight", - "Batman vs. Joker", "https://upload.wikimedia.org/wikipedia/en/8/8a/Dark_Knight.jpg", "https://www.youtube.com/watch?v=_PZpmTj1Q8Q") -batman.show_trailer() -""" -movies = [toy_story, avatar, school_of_rock, ratatouille, midnight_in_paris, hunger_games] + +movies = [terminator_2, inception, hunger_games, batman] fresh_tomatoes.open_movies_page(movies) -#print(media.Movie.VALID_RATINGS) -#print(media.Movie.__doc__) From a8c39a4c54c684c565435f7056bbbf2bb3f90719 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:28:56 -0400 Subject: [PATCH 08/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3418a5c2..b951741f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Movie Trailer Website** is a project that has been written for **Udacity's Full Stack Developer Nanodegree Program**. -In this project, the webpage will display six of my favorite movies that I have selected. When the image of the movie is clicked, the corresponding movie trailer shall display via youtube. +In this project, the webpage will display three of my favorite movies that I have selected. When the image of the movie is clicked, the corresponding movie trailer shall display via youtube. ## Requirments From fb6538eea19e0df47901547e55e6afac3c67fdd0 Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:30:53 -0400 Subject: [PATCH 09/10] Update entertainment_center.py --- entertainment_center.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entertainment_center.py b/entertainment_center.py index 88ad02d6..629e3a80 100644 --- a/entertainment_center.py +++ b/entertainment_center.py @@ -14,5 +14,5 @@ "https://www.youtube.com/watch?v=_PZpmTj1Q8Q") -movies = [terminator_2, inception, hunger_games, batman] +movies = [terminator_2, inception, batman] fresh_tomatoes.open_movies_page(movies) From 65ac28976c6b9c50d69e0c0dd9c4f8daba5602bf Mon Sep 17 00:00:00 2001 From: jye0325 <30542235+jye0325@users.noreply.github.com> Date: Sat, 29 Jul 2017 17:37:57 -0400 Subject: [PATCH 10/10] Update README.md --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b951741f..ca525cdc 100644 --- a/README.md +++ b/README.md @@ -16,16 +16,23 @@ To obtain a copy of this project download the entire contents of this repository ## Usage -**1) Open command prompt or terminal.** +### First Runtime +1) Open command prompt or terminal. -**2) Navigate to the folder where the files are unzipped at.** +2) Navigate to the folder where the files are unzipped at. `cd ` -**3) Open the project.** +3) Compile and open the project. `python entertainment_center.py` +### Not The First Runtime + +The project will have created `fresh_tomatoes.html` after the first runtime. You can skip the annoying steps and just open the webpage without recompliling it. + +**\*Note if you need to update the project, the project must be recompiled to display any changes.** + ## Source Majority of this project has been written during the **Programming Fundamentals and the Web** section of the Nanodegree Program. With that said, this project's source code will be similar, if not almost identical, to the structure of the example provided by the Nanodegree Program. No plagarism or copyright infringement was inteneded during the production of this project.