{"id":18376678,"url":"https://github.com/manojpatra1991/fresh_tomatoes","last_synced_at":"2025-09-07T00:44:06.243Z","repository":{"id":104745312,"uuid":"94175793","full_name":"MANOJPATRA1991/fresh_tomatoes","owner":"MANOJPATRA1991","description":"A movie web application created as a project assignment for the Udacity full stack nanodegree course","archived":false,"fork":false,"pushed_at":"2017-06-13T16:19:21.000Z","size":4422,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T06:44:13.053Z","etag":null,"topics":["pep8","pylint","python3","udacity-fullstack-nanodegree"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MANOJPATRA1991.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-13T06:09:50.000Z","updated_at":"2017-07-09T12:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5e15e98-62fb-4f40-aa8d-086862b665e2","html_url":"https://github.com/MANOJPATRA1991/fresh_tomatoes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MANOJPATRA1991/fresh_tomatoes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MANOJPATRA1991%2Ffresh_tomatoes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MANOJPATRA1991%2Ffresh_tomatoes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MANOJPATRA1991%2Ffresh_tomatoes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MANOJPATRA1991%2Ffresh_tomatoes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MANOJPATRA1991","download_url":"https://codeload.github.com/MANOJPATRA1991/fresh_tomatoes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MANOJPATRA1991%2Ffresh_tomatoes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273983073,"owners_count":25202092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pep8","pylint","python3","udacity-fullstack-nanodegree"],"created_at":"2024-11-06T00:24:22.930Z","updated_at":"2025-09-07T00:44:06.217Z","avatar_url":"https://github.com/MANOJPATRA1991.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fresh Tomatoes Movie Trailer Website \n\nThis website was done as the first of 6 projects from the [Udacity Full Stack Nanodegree course](https://in.udacity.com/course/full-stack-web-developer-nanodegree--nd004/).\nThe user can view movie trailers and look for additional information on the website.\n\n## Table of Contents\n1. [Installation](#installation)\n2. [Screenshots](#screenshots) \n3. [Description](#description)\n5. [Reference](#reference)\n6. [License](#license)\n\n### Installation\nThe source code for this project is written in [Python](https://www.python.org/downloads/) programming language. It works well in both version 3.6.1 as well as 2.7.13.\nFor direct download of version 3.6.1 [click here](https://www.python.org/ftp/python/3.6.1/python-3.6.1.exe) and for version 2.7.13 [click here](https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi).\n\nThe source code was checked against bugs and quality using **Pylint** checker and [PEP8 online check](http://pep8online.com).\nTo install Pylint:\n```\npip install pylint\n```\n\nTo check Python file using Pylint:\n```\npylint fileName.py\n```\n### Screenshots\n\n![](https://github.com/MANOJPATRA1991/fresh_tomatoes/blob/master/Screenshots/Screenshot%20(6).png?raw=true)\n![](https://github.com/MANOJPATRA1991/fresh_tomatoes/blob/master/Screenshots/Screenshot%20(7).png?raw=true)\n![](https://github.com/MANOJPATRA1991/fresh_tomatoes/blob/master/Screenshots/Screenshot%20(10).png?raw=true)\n\n### Description\nInside the **fresh_tomatoes** directory, we have a **movies** folder which contains **entertainment_center.py**, **media.py** and **my_movies.py** files.\n\n**my_movies.py** writes html, css and javascript required to run the website to the **fresh_tomatoes.html** file.\n\n**media.py** contains the Movie class with the help of which instances of type Movie can be created.\n\n**entertainment_center.py** is the file where we create Movie instances and that when executed runs the program and opens the website on a web browser.\n\n##### Executing the program\n\nTo run the program, clone or download the repository to your desktop. Then open **entertainment_center.py** with **Python IDLE** and then **Run -\u003e Run Module** or press **F5** for instant execution.\n\n##### The Movie Class\n```\nclass Movie(object):\n    \"\"\"This class provides a way to store movie related information\"\"\"\n\n    VALID_RATINGS = [\"G\", \"PG\", \"PG-13\", \"R\"]\n    MOVIE_GENRE = [\"Science Fiction\", \"Crime\", \"Thriller\",\n                   \"Fantasy\", \"Drama\", \"Action\"]\n\n    def __init__(self, movie_title, movie_storyline, movie_genre, poster_image,\n                 trailer_youtube, mpaa_rating, imdb, rotten_tomatoes,\n                 cast, director, reviews, reviewers):\n        \"\"\"\n        Initializes Movie class instance with following instance variables:\n\n            title\n            storyline\n            genre\n            poster_image_url\n            trailer_youtube_url\n            mpaa_rating\n            imdb\n            rotten_tomatoes\n            cast\n            director\n            reviews\n            reviewers\n        \"\"\"\n        self.title = movie_title\n        self.storyline = movie_storyline\n        self.genre = movie_genre\n        self.poster_image_url = poster_image\n        self.trailer_youtube_url = trailer_youtube\n        self.mpaa_rating = mpaa_rating\n        self.imdb = imdb\n        self.rotten_tomatoes = rotten_tomatoes\n        self.cast = cast\n        self.director = director\n        self.reviews = reviews\n        self.reviewers = reviewers\n\n    def show_trailer(self):\n        \"\"\"This function opens a web browser to play\n        the trailer for a Movie class instance\"\"\"\n        webbrowser.open(self.trailer_youtube_url)\n```\n##### Creating an instance of the Movie class:\n```\n# INTERSTELLAR\ninterstellar = media.Movie(\n    \"Interstellar\",\n    \"In the future, Earth is slowly becoming uninhabitable. Ex\"\n    \"Ex-NASA pilot Cooper, along with a team of researchers, \"\n    \"is sent on a planet exploration mission to report which \"\n    \"planet can sustain life.\",\n    media.Movie.MOVIE_GENRE[0] + \"  |  \" + media.Movie.MOVIE_GENRE[4],\n    \"http://static.tvtropes.org/pmwiki/pub/images/\" +\n    \"interstellar_film_poster_1146.jpg\",\n    \"https://www.youtube.com/watch?v=ePbKGoIGAXY\",\n    media.Movie.VALID_RATINGS[2],\n    8.6,\n    \"71%\",\n    [\n        \"Matthew McConaughey\",\n        \"Anna Hathaway\",\n        \"Jessica Chastain\",\n        \"Matt Damon\"],\n    \"Christopher Nolan\",\n    [\n        \"In 2001, Kubrick saw a future that was out of our hands. \"\n        \"For Nolan, our reliance on one another is all we have got.\",\n        \"Brainy, barmy and beautiful to behold, this is Stephen \"\n        \"Hawkings Star Trek: a mind-bending opera of space and \"\n        \"time with a soul wrapped up in all the science.\",\n        \"As visually and conceptually audacious as anything Nolan \"\n        \"has yet done, the directors ninth feature also proves \"\n        \"more emotionally accessible than his coolly cerebral \"\n        \"thrillers and Batman movies.\"\n    ],\n    [\n        \"Peter Travers, Rolling Stone\",\n        \"James Dyer, Empire\",\n        \"Scott Foundas, Variety\"\n    ])\n```\n`my_movies.open_movies_page(movies)` does the trick of creating a new fresh_tomatoes.html file(if it doesn't already exist) and open it in a web browser.\n\n### Reference\n1. [Python Documentation](https://docs.python.org/3/)\n2. [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html)\n3. [PEP8](https://www.python.org/dev/peps/pep-0008/)\n\n### License\nThe content of this repository is licensed under [MIT](https://choosealicense.com/licenses/mit/).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojpatra1991%2Ffresh_tomatoes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanojpatra1991%2Ffresh_tomatoes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanojpatra1991%2Ffresh_tomatoes/lists"}