Skip to main content

Apply a time offset to a subtitle .srt file

Project description

Apply a time offset to a subtitle .srt file.

Example:

$ cat ~/example.srt
1
00:00:01,600 --> 00:00:04,200
English (US)

2
00:00:05,900 --> 00:00:07,999
This is a subtitle in American English

3
00:00:10,000 --> 00:00:14,000
Adding subtitles is very easy to do
$ srtoffset ~/example.srt '00:00:05,500'
1
00:00:07,100 --> 00:00:09,700
English (US)

2
00:00:11,400 --> 00:00:13,499
This is a subtitle in American English

3
00:00:15,500 --> 00:00:19,500
Adding subtitles is very easy to do
$ srtoffset ~/example.srt '00:00:01,000' --rewind
1
00:00:00,600 --> 00:00:03,200
English (US)

2
00:00:04,900 --> 00:00:06,999
This is a subtitle in American English

3
00:00:09,000 --> 00:00:13,000
Adding subtitles is very easy to do

Setup the dev environment

$ poetry init
$ poetry install

Run the tests

$ poetry run pytest

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

srtoffset-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

srtoffset-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file srtoffset-0.1.1.tar.gz.

File metadata

  • Download URL: srtoffset-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/17.7.0

File hashes

Hashes for srtoffset-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8c7c3b17a46a2c4f15d9a14a5ad283bcadfb96d956512faef15aa79eb7ec292c
MD5 53dc248c4d82ee19cb743efdfcff8cb7
BLAKE2b-256 d14df046d0da2de4b389d1257f9ca824a8f3919a6762e24db8ae3504c3598628

See more details on using hashes here.

File details

Details for the file srtoffset-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: srtoffset-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/17.7.0

File hashes

Hashes for srtoffset-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae57785cc0bd9780190ae0d0d7a63573a556405606d08daee053eaa720fa6c70
MD5 e007655ed0a9ed402d32ffc39d4da7cd
BLAKE2b-256 d97cd863d91ff4a4c9fd4ee91efb955a533517465034b5937d2a1e104d12e665

See more details on using hashes here.

Supported by

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