PHPackages                             mihaeu/sub-collector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mihaeu/sub-collector

ActiveLibrary

mihaeu/sub-collector
====================

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

2.0.2(11y ago)340MITPHPPHP &gt;=5.3.3CI failing

Since Oct 25Pushed 5y ago2 watchersCompare

[ Source](https://github.com/mihaeu/sub-collector)[ Packagist](https://packagist.org/packages/mihaeu/sub-collector)[ RSS](/packages/mihaeu-sub-collector/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (10)Used By (0)

Sub-Collector
=============

[](#sub-collector)

[![Build Status](https://camo.githubusercontent.com/beb5073abb01934600fd5f414c694d79b376a8bc9e25bf7ebb7398a89a61ea9f/68747470733a2f2f7472617669732d63692e6f72672f6d69686165752f7375622d636f6c6c6563746f722e706e67)](https://travis-ci.org/mihaeu/sub-collector)[![Coverage Status](https://camo.githubusercontent.com/bdeb9159f12b7af2ed1b0dec1137f9d64dc9a113b88396bae3535605964dfb41/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d69686165752f7375622d636f6c6c6563746f722f62616467652e706e67)](https://coveralls.io/r/mihaeu/sub-collector)

[![sub-collector usage example](https://camo.githubusercontent.com/565745c5ecd1378ae48bd982b3cd9dda4b0b583d738e4abaa09c0e84d8b2ce06/687474703a2f2f6b696d61692e6d696b652d6465762e696e666f2f7375622d636f6c6c6563746f722d6578616d706c652e676966)](https://camo.githubusercontent.com/565745c5ecd1378ae48bd982b3cd9dda4b0b583d738e4abaa09c0e84d8b2ce06/687474703a2f2f6b696d61692e6d696b652d6465762e696e666f2f7375622d636f6c6c6563746f722d6578616d706c652e676966)

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.

Installation
------------

[](#installation)

> 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](https://getcomposer.org/doc/00-intro.md) 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
```

Usage
-----

[](#usage)

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]
```

Tests
-----

[](#tests)

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:

```
# ...

DownloadCommand
 [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

Finder
 [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

SubCollector
 [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

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

Thanks to
---------

[](#thanks-to)

- [themoviedb.org](http://www.themoviedb.org/) for providing a free-to-use API
- [Symfony](http://symfony.com/)/[SensioLabs](http://sensiolabs.com/en) and especially [Fabien Potencier](http://fabien.potencier.org/) for what he does for PHP (for this particular project the [DomCrawler](https://github.com/symfony/DomCrawler))
- the [Composer](https://getcomposer.org/) team for revolutionizing the way I and many others write PHP
- [GitHub](https://github.com) for redefining collaboration
- [Travis CI](https://travis-ci.org/) for improving the quality and compatibility of thousands of open source projects
- [Sebastian Bergmann](http://sebastian-bergmann.de/) for [PHPUnit](http://phpunit.de) and many other awesome QA tools

License
-------

[](#license)

MIT, see `LICENSE` file.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 76.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~28 days

Total

7

Last Release

4318d ago

Major Versions

0.1 → 1.0.12014-03-20

1.0.3 → 2.0.02014-07-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1cfd32112845e28319a56265bdcac255118e0fba4eb36ccfa6c718f5e52bc49?d=identicon)[mihaeu](/maintainers/mihaeu)

---

Top Contributors

[![mihaeu](https://avatars.githubusercontent.com/u/2168701?v=4)](https://github.com/mihaeu "mihaeu (65 commits)")[![martinlindhe](https://avatars.githubusercontent.com/u/181531?v=4)](https://github.com/martinlindhe "martinlindhe (20 commits)")

---

Tags

moviesubtitleSubDB

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mihaeu-sub-collector/health.svg)

```
[![Health](https://phpackages.com/badges/mihaeu-sub-collector/health.svg)](https://phpackages.com/packages/mihaeu-sub-collector)
```

###  Alternatives

[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[captioning/captioning

A collection of tools to manipulate subtitles

2261.3M7](/packages/captioning-captioning)[php-tmdb/api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

424378.6k16](/packages/php-tmdb-api)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

16553.3k1](/packages/php-tmdb-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
