Skip to content

Scans an Open Directory containing movies and looks them up on IMDB

Notifications You must be signed in to change notification settings

jaeseopark/od-imdb

Repository files navigation

od-imdb

Scans an Open Directory containing movies and looks them up on IMDB.

Installation

  1. Install docker and docker-compose.
  2. Run (UNIX):
    wget https://raw.githubusercontent.com/jaeseopark/od-imdb/master/docker-compose-production.yml docker-compose.yml
    docker-compose up -d
    
  3. (Optional) Install the Chrome extension in browser-extension/.

Advanced Usage

Update Repository

curl --request POST "http://localhost:2014/api/update"

Use Third Party API

Using a well-established third party API for the lookup will improve a number of things such as:

  • the relevance of the search results;
  • the latency of the search; and
  • the access to recently released titles.

TODO: write about https://imdb-api.com/

Custom Modules

You can bring your own implementations of OdParser, Repository, or UpdatableRepository:

pip install od-imdb
from typing import List

from od_imdb.repository.interface import Repository
from od_imdb.interface import OdFileEntity
from od_imdb.od_imdb import OdImdb
from od_imdb.od_parser.interface import OdParser

class MyCustomParser(OdParser):
   def get_entities(self, url: str) -> List[OdFileEntity]:
      return [...]

class MyCustomRepository(Repository):
   def decorate_safe(self, entities: List[OdFileEntity]):
      for entity in entities:
         my_awesome_lookup_algorithm(entity)

custom_parser = MyCustomParser()
custom_repo = MyCustomRepository()
od_imdb = OdImdb(od_parser=custom_parser, repository=custom_repo)

od_imdb.lookup("http://foo.bar/folder123/")

Development

docker-compose up --build

About

Scans an Open Directory containing movies and looks them up on IMDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published