Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

FINAL #21

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 45 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# ud036_StarterCode
Source code for a Movie Trailer website.
# Movie Trailer Website

**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 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

Please ensure your system contains the following software prior to using this project:

* [Python 2.7](https://www.python.org/download/releases/2.7/)

## Download

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.

## Usage

### First Runtime
1) Open command prompt or terminal.

2) Navigate to the folder where the files are unzipped at.

`cd <insert path for location of the files>`

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.

## 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 [UNLICENSE](github.com/jye0325/ud036_StarterCode/UNLICENSE)
24 changes: 24 additions & 0 deletions UNLICENSE
Original file line number Diff line number Diff line change
@@ -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 <https://unlicense.org>
18 changes: 18 additions & 0 deletions entertainment_center.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import fresh_tomatoes
import media

terminator_2 = media.Movie("Terminator 2",
"https://upload.wikimedia.org/wikipedia/en/8/85/Terminator2poster.jpg",
"https://www.youtube.com/watch?v=VVZQ39i5G1s")

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")

batman = media.Movie("The Dark Knight",
"https://upload.wikimedia.org/wikipedia/en/8/8a/Dark_Knight.jpg",
"https://www.youtube.com/watch?v=_PZpmTj1Q8Q")


movies = [terminator_2, inception, batman]
fresh_tomatoes.open_movies_page(movies)
12 changes: 12 additions & 0 deletions media.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import webbrowser

class Movie():

def __init__(self, movie_title, poster_image,
trailer_youtube):
self.title = movie_title
self.poster_image_url = poster_image
self.trailer_youtube_url = trailer_youtube

def show_trailer(self):
webbrowser.open(self.trailer_youtube_url)