You know TMDB (The Movie DataBase)? It’s like IMDB, but without being awful.

tl;dr: I made a cli TMDB query tool in Ruby and here it is with documentation: https://github.com/decipher-media/tmdbget

As part of our podcast website migration from WordPress to Jekyll, I’m coding in a bunch of functionality that I’ve wanted for a while. The first one: a cli utility to fetch movie metadata into (semi-)structured data.

So here it is

https://github.com/decipher-media/tmdbget

Grab some API keys form TMDB and it’s easy-peasy to get some movie and tv metadata:

bundle exec tmdbget.rb --key [TMDB API KEY] 'the terminator' 1 bundle exec tmdbget .rb -- key [ TMDB API KEY ] 'the terminator'

To get something like:

{ "The Terminator": { "vote_count": 5259, "id": 218, "video": false, "vote_average": 7.4, "title": "The Terminator", "popularity": 21.31828, "poster_path": "/q8ffBuxQlYOHrvPniLgCbmKK4Lv.jpg", "original_language": "en", "original_title": "The Terminator", "genre_ids": [ 28, 53, 878 ], "backdrop_path": "/6yFoLNQgFdVbA8TZMdfgVpszOla.jpg", "adult": false, "overview": "In the post-apocalyptic future, reigning tyrannical supercomputers teleport a cyborg assassin known as the \"Terminator\" back to 1984 to kill Sarah Connor, whose unborn son is destined to lead insurgents against 21st century mechanical hegemony. Meanwhile, the human-resistance movement dispatches a lone warrior to safeguard Sarah. Can he stop the virtually indestructible killing machine?", "release_date": "1984-10-26", "release_year": "1984" } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "The Terminator" : { "vote_count" : 5259 , "id" : 218 , "video" : false , "vote_average" : 7.4 , "title" : "The Terminator" , "popularity" : 21.31828 , "poster_path" : "/q8ffBuxQlYOHrvPniLgCbmKK4Lv.jpg" , "original_language" : "en" , "original_title" : "The Terminator" , "genre_ids" : [ 28 , 53 , 878 ] , "backdrop_path" : "/6yFoLNQgFdVbA8TZMdfgVpszOla.jpg" , "adult" : false , "overview" : "In the post-apocalyptic future, reigning tyrannical supercomputers teleport a cyborg assassin known as the \"Terminator\" back to 1984 to kill Sarah Connor, whose unborn son is destined to lead insurgents against 21st century mechanical hegemony. Meanwhile, the human-resistance movement dispatches a lone warrior to safeguard Sarah. Can he stop the virtually indestructible killing machine?" , "release_date" : "1984-10-26" , "release_year" : "1984" } }

Check the help output for full and up-to-date functionality details, including a flag for interactive mode for when you’re less than confident that you’ll get the right answer. 🤓