Skip to main content

Subtitles, faster than your thoughts

Project description

Subtitles, faster than your thoughts.

Latest Version Travis CI build status Documentation Status Code coverage License
Project page:

https://github.com/Diaoul/subliminal

Documentation:

https://subliminal.readthedocs.org/

Usage

CLI

Download English subtitles:

$ subliminal download -l en The.Big.Bang.Theory.S05E18.HDTV.x264-LOL.mp4
Collecting videos  [####################################]  100%
1 video collected / 0 video ignored / 0 error
Downloading subtitles  [####################################]  100%
Downloaded 1 subtitle

Library

Download best subtitles in French and English for videos less than two weeks old in a video folder:

from datetime import timedelta

from babelfish import Language
from subliminal import download_best_subtitles, region, save_subtitles, scan_videos

# configure the cache
region.configure('dogpile.cache.dbm', arguments={'filename': 'cachefile.dbm'})

# scan for videos newer than 2 weeks and their existing subtitles in a folder
videos = [v for v in scan_videos('/video/folder') if v.age < timedelta(weeks=2)]

# download best subtitles
subtitles = download_best_subtitles(videos, {Language('eng'), Language('fra')})

# save them to disk, next to the video
save_subtitles(subtitles)

Changelog

1.0.1

release date: 2015-07-23

  • Fix unicode issues in CLI (python 2 only)

  • Fix score scaling in CLI (python 2 only)

  • Improve error handling in CLI

  • Color collect report in CLI

1.0

release date: 2015-07-22

  • Many changes and fixes

  • New test suite

  • New documentation

  • New CLI

0.7.5

release date: 2015-03-04

  • Update requirements

  • Remove BierDopje provider

  • Add pre-guessed video optional argument in scan_video

  • Improve hearing impaired support

  • Fix TVSubtitles and Podnapisi providers

0.7.4

release date: 2014-01-27

  • Fix requirements for guessit and babelfish

0.7.3

release date: 2013-11-22

  • Fix windows compatibility

  • Improve subtitle validation

  • Improve embedded subtitle languages detection

  • Improve unittests

0.7.2

release date: 2013-11-10

  • Fix TVSubtitles for ambiguous series

  • Add a CACHE_VERSION to force cache reloading on version change

  • Set CLI default cache expiration time to 30 days

  • Add podnapisi provider

  • Support script for languages e.g. Latn, Cyrl

  • Improve logging levels

  • Fix subtitle validation in some rare cases

0.7.1

release date: 2013-11-06

  • Improve CLI

  • Add login support for Addic7ed

  • Remove lxml dependency

  • Many fixes

0.7.0

release date: 2013-10-29

WARNING: Complete rewrite of subliminal with backward incompatible changes

  • Use enzyme to parse metadata of videos

  • Use babelfish to handle languages

  • Use dogpile.cache for caching

  • Use charade to detect subtitle encoding

  • Use pysrt for subtitle validation

  • Use entry points for subtitle providers

  • New subtitle score computation

  • Hearing impaired subtitles support

  • Drop async support

  • Drop a few providers

  • And much more…

0.6.4

release date: 2013-05-19

  • Fix requirements due to enzyme 0.3

0.6.3

release date: 2013-01-17

  • Fix requirements due to requests 1.0

0.6.2

release date: 2012-09-15

  • Fix BierDopje

  • Fix Addic7ed

  • Fix SubsWiki

  • Fix missing enzyme import

  • Add Catalan and Galician languages to Addic7ed

  • Add possible services in help message of the CLI

  • Allow existing filenames to be passed without the ./ prefix

0.6.1

release date: 2012-06-24

  • Fix subtitle release name in BierDopje

  • Fix subtitles being downloaded multiple times

  • Add Chinese support to TvSubtitles

  • Fix encoding issues

  • Fix single download subtitles without the force option

  • Add Spanish (Latin America) exception to Addic7ed

  • Fix group_by_video when a list entry has None as subtitles

  • Add support for Galician language in Subtitulos

  • Add an integrity check after subtitles download for Addic7ed

  • Add error handling for if not strict in Language

  • Fix TheSubDB hash method to return None if the file is too small

  • Fix guessit.Language in Video.scan

  • Fix language detection of subtitles

0.6.0

release date: 2012-06-16

WARNING: Backward incompatible changes

  • Fix –workers option in CLI

  • Use a dedicated module for languages

  • Use beautifulsoup4

  • Improve return types

  • Add scan_filter option

  • Add –age option in CLI

  • Add TvSubtitles service

  • Add Addic7ed service

0.5.1

release date: 2012-03-25

  • Improve error handling of enzyme parsing

0.5

release date: 2012-03-25 WARNING: Backward incompatible changes

  • Use more unicode

  • New list_subtitles and download_subtitles methods

  • New Pool object for asynchronous work

  • Improve sort algorithm

  • Better error handling

  • Make sorting customizable

  • Remove class Subliminal

  • Remove permissions handling

0.4

release date: 2011-11-11

  • Many fixes

  • Better error handling

0.3

release date: 2011-08-18

  • Fix a bug when series is not guessed by guessit

  • Fix dependencies failure when installing package

  • Fix encoding issues with logging

  • Add a script to ease subtitles download

  • Add possibility to choose mode of created files

  • Add more checks before adjusting permissions

0.2

release date: 2011-07-11

  • Fix plugin configuration

  • Fix some encoding issues

  • Remove extra logging

0.1

release date: private release

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subliminal-1.0.1.tar.gz (30.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

subliminal-1.0.1-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

subliminal-1.0.1-py2-none-any.whl (41.6 kB view details)

Uploaded Python 2

File details

Details for the file subliminal-1.0.1.tar.gz.

File metadata

  • Download URL: subliminal-1.0.1.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for subliminal-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f301607fad8cdcf098da8f59f2e62a4a285be0987c61d69f883dc40a0839ebd6
MD5 a7422da759a1aa4ae60641ddfbd1cc23
BLAKE2b-256 f33322ba4aec0b97bccff9bae5761774940d54fb47729bbc0094613d3faf2bb0

See more details on using hashes here.

File details

Details for the file subliminal-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for subliminal-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea733ccf34d7d4d66e235a41b997fada7dee06e1c65eb7c68bb060edc3b1f05
MD5 5b117d2d9e1ec3d9b592ff92d82d8f87
BLAKE2b-256 866a6ea1b41156c198e6e5f2c058bf2b6526230b142264c18f32aebf564fb9ce

See more details on using hashes here.

File details

Details for the file subliminal-1.0.1-py2-none-any.whl.

File metadata

File hashes

Hashes for subliminal-1.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 047831e28d18e59235bdc91afce788d5a36e2f91f45bdf57d51e2a3bc5e81c9c
MD5 6dc2c0c3a48339ae1e8f6cf30b8a45fc
BLAKE2b-256 7cecaf3673b67a77c962d48ba1a62f88c251085adcf5c22ac83d56d238e9f5d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page