What It Does - RenegadeFox/movie-metadata GitHub Wiki

What movie-metadata does exactly, and why it's useful.

movie-metadata takes an Array, JSON file, or plain list of movie titles, searches omdb for each movies' respective metadata (title, rating, release date, actors, plot, etc.) and either returns it as an Object or writes it to a JSON file.

This allows you to easily and quickly get movie metadata with just a simple list of movie titles.

Example

Lets say you went through a Wikipedia page (like this one) with a list of movie titles in it, and copied all of them to a JSON file (or wrote a script that did it for you).

You then have a JSON file similar to this (some movies from 2018), lets say it's at /movies/_2018Movies.json:

[
	"Ralph Breaks the Internet and stuff",
	"Fantastic Beasts: The Crimes of Grindelwald",
	"Creed II",
	"Avengers: Infinity War",
	"Venom",
	"Aquaman",
	"Deadpool 2",
	"Incredibles 2",
	"Bohemian Rhapsody",
	"Robin Hood",
	"A Star Is Born",
	"The Girl in the Spider's Web: A New Dragon Tattoo Story",
	"Black Panther",
	"Mary Poppins Returns",
	"Ant-Man and the Wasp",
	"Spider-Man: Into the Spider-Verse",
	"First Man",
	"The Grinch",
	"Mission: Impossible - Fallout",
	"Solo: A Star Wars Story",
	"Widows",
	"The Meg",
	"Mortal Engines",
	"Halloween",
	"Bumblebee",
	"Crazy Rich Asians",
	"Jurassic World: Fallen Kingdom",
	"The Predator",
	"Ocean's Eight",
	"The Nutcracker and the Four Realms",
	"Terminator 2: Judgment Day",
	"Green Book",
	"Hereditary",
	"Christopher Robin",
	"The Nun",
	"Searching",
	"Boy Erased",
	"Rampage",
	"A Quiet Place",
	"Mamma Mia! Here We Go Again",
	"Annihilation",
	"Smallfoot",
	"Welcome to Marwen",
	"A Wrinkle in Time",
	"Suspiria",
	"The Spy Who Dumped Me",
	"Mary, Queen of Scots",
	"Overlord",
	"Zero",
	"The Equalizer 2",
	"96"
]

But you want to get the metadata for each of those movies. Instead of searching with each movie title individually (or using IMDb), you can signup for a free omdb API, and run the following:

$ getmetadata -k YOUR_API_KEY -s /movies/_2018Movies.json

This will run and create a new file /movies/_2018Movies-metadata.json which should look similar to this:

[
  {
    "Title": "Fantastic Beasts: The Crimes of Grindelwald",
    "Year": "2018",
    "Rated": "N/A",
    "Released": "16 Nov 2018",
    "Runtime": "134 min",
    "Genre": "Adventure, Family, Fantasy",
    "Director": "David Yates",
    "Writer": "J.K. Rowling, J.K. Rowling (based upon characters created by)",
    "Actors": "Johnny Depp, Kevin Guthrie, Carmen Ejogo, Wolf Roth",
    "Plot": "The second installment of the \"Fantastic Beasts\" series set in J.K. Rowling's Wizarding World featuring the adventures of magizoologist Newt Scamander.",
    "Language": "English",
    "Country": "UK, USA",
    "Awards": "N/A",
    "Poster": "https://m.media-amazon.com/images/M/MV5BZjFiMGUzMTAtNDAwMC00ZjRhLTk0OTUtMmJiMzM5ZmVjODQxXkEyXkFqcGdeQXVyMDM2NDM2MQ@@._V1_SX300.jpg",
    "Ratings": [
      {
        "Source": "Internet Movie Database",
        "Value": "7.4/10"
      },
      {
        "Source": "Rotten Tomatoes",
        "Value": "40%"
      },
      {
        "Source": "Metacritic",
        "Value": "55/100"
      }
    ],
    "Metascore": "55",
    "imdbRating": "7.4",
    "imdbVotes": "12,444",
    "imdbID": "tt4123430",
    "Type": "movie",
    "DVD": "N/A",
    "BoxOffice": "N/A",
    "Production": "Warner Bros. Pictures",
    "Website": "https://www.facebook.com/fantasticbeastsmovie/",
    "Response": "True"
  },
  // ...
]

Now if there were any movies, from that list, that were not found on omdb's API server, another file will be created /movies/_2018Movies-notfound.json. This file will contain an Array of all movies that were not found.