github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

byroot / pysrt

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 0
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Python parser for SubRip (srt) files — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

release: 0.2.2 
Jean Boussier (author)
Sat Nov 07 10:22:18 -0800 2009
commit  ef4cf89bfe955c1d914e39c4658349bad8fe398b
tree    819a8e309b540c27db7a72f08014ded18c06936d
parent  ee2d5d3a9aab883039f9ace05c4064de9205a08b
pysrt /
name age
history
message
file .gitignore Loading commit data...
file MANIFEST
file PKG-INFO
file README
directory pysrt/
file setup.py
directory tests/
README
pysrt is a Python library used to edit or create SubRip files.

Usage
=====

::

    from pysrt import SubRipFile, SubRipItem, SubRipTime
    subs = SubRipFile('some/file.srt')
    subs[42].end.hours += 3
    subs[42].text = "Never end !"

    #equivalent
    part = subs.slice(ends_after=SubRipTime(0, 0, 40))
    part = subs.slice(ends_after=(0, 0, 40))
    part = subs.slice(ends_after={'seconds': 40})
    
    part.shift(seconds=-2)
    subs.save('other/path.srt', 'utf-8')
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server