Metadata-Version: 1.0
Name: pysrt
Version: 0.3.0
Summary: SubRip (.srt) subtitle parser and writer
Home-page: http://github.com/byroot/pysrt
Author: Jean Boussier
Author-email: jean.boussier@gmail.com
License: GPLv3
Description: pysrt is a Python library used to edit or create SubRip files.
        
        Basic Usage
        =============
        
        Import: ::
        
            >>> from pysrt import SubRipFile
            
        Parsing: ::
        
            >>> subs = SubRipFile.open('some/file.srt')
            # If you get a UnicodeDecodeError try to specify the encoding
            >>> subs = SubRipFile.open('some/file.srt', encoding='iso-8859-1')
            
        SubRipFile are list-like objects of SubRipItem instances: ::
            
            >>> len(first_sub)
            >>> first_sub = subs[0]
            
        SubRipItem instances are editable just like pure Python objects: ::
            
            >>> first_sub.text = "Hello World !"
            >>> first_sub.start.seconds = 20
            >>> first_sub.end.minutes = 5
            
        Shifting: ::
        
            >>> subs.shift(seconds=-2) # Move all subs 2 seconds earlier
            >>> subs.shift(minutes=1)  # Move all subs 1 minutes later
            >>> subs.shift(ratio=25/23.9) # convert a 23.9 fps subtitle in 25 fps
            >>> first_sub.shift(seconds=1) # Move the first sub 1 second later
            >>> first_sub.start += {'seconds': -1} # Make the first sub start 1 second earlier
            
        Removing: ::
            
            >>> del subs[12]
            
        Slicing: ::
            
            >>> part = subs.slice(starts_after={'minutes': 2, seconds': 30}, ends_before={'minutes': 3, 'seconds': 40})
            >>> part.shift(seconds=-2)
            
        Saving changes: ::
            
            >>> subs.save('other/path.srt', encoding='utf-8')
        
Keywords: SubRip srt subtitle
Platform: Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Markup
