Sub-Collector is a console based app written in PHP, its main purpose is to batch collect subtitles.

2.0.2 2014-07-13 09:03 UTC

This package is auto-updated.

Last update: 2020-07-04 08:53:32 UTC


Build Status Coverage Status

sub-collector usage example

Sub-Collector is a small project that I started, because I was sick of manually searching for subtitles for my ever growing collection of movies.

There are other tools out there which are way more mature and which have a wide selection of features. These tools however were not written in PHP and this is console based, so let's see where it goes.


I'm assuming you're familiar with Composer. If you are not and you made it here, I strongly advise you to take 5 minutes to read up on the Getting Started section. It'll change your life (or at least the way you write PHP).

Make sure ~/.composer/bin is in your $PATH and then simply execute:

composer global require mihaeu/sub-collector:dev-master


For now Sub-Collector's functionality is very limited. To download subtitles for all the movies (or a single movie) within a path just use:

sub-collector download [PATH_TO_YOUR_MOVIE_COLLECTION]


I'm aiming for as close to 100% test coverage as is sensible. If you want to check out the tests for yourself install the require-dev deps from composer (default) and run:

vendor/bin/phpunit --testdoc --coverage-text

The --testdox produces a more "agile" (buzzzz!) output which is a good way to get started if you're trying to check out the functionality. The whole command will produce something like this:

# ...

 [x] Downloading of subtitles for a movie without subtitle and existing subtitle on server
 [x] Download of subtitles for movie without subtitle but no subtitle on server
 [x] Downloading of subtitles for a movie which has subtitles is skipped

 [x] Only accepts directories
 [x] Only movies are found in a folder
 [x] Movies can be nested deeply inside a folder
 [x] Movie with subtitle will be detected
 [x] Movie without subtitle will be detected
 [x] Custom file extensions will be detected

 [x] Subtitle can be downloaded if exists
 [x] Subtitle cannot be downloaded if it does not exist
 [x] Downloaded subtitle will be saved as a srt file
 [x] Subtitle file will only be saved when subtitle was found

# ...

Code Coverage Report

  Classes: 83.33% (5/6)
  Methods: 88.24% (15/17)
  Lines:   84.00% (84/100)

Thanks to


MIT, see LICENSE file.