No project description provided
Project description
srtedit
A command-line tool for quickly editing subtitle (.srt) files.
Installation
pip install srtedit
Basic Usage
Offset subtitles in milliseconds
srtedit subtitles.srt --offset 1000
Will add exactly 1 second to all subtitle elements. Conversely:
srtedit subtitles.srt --offset -1000
Will subtract 1 second from all subtitle elements.
The modified subtitles will be printed to stdout. Use -o to specify an output file:
srtedit subtitles.srt --offset 500 -o new.srt
Selecting
The -s/--select option allows you to select a single or range of subtitle elements to modify. This can work alongside other options such as --remove, --edit, and --offset.
On its own, it can be used to select a portion of the subtitles:
srtedit subtitles.srt -s 1:10 # Grab the first 10 elements
Single element:
srtedit subtitles.srt -s 4 # Grab the 4th element
Remove subtitle element
Use the -r/--remove option to remove a selected element.
srtedit subtitles.srt -s 1 --remove
Edit subtitle element
srtedit subtitles.srt -s 1 --edit "New text"
Count number of elements
srtedit subtitles.srt --count
Multiple options
You can use multiple options together like this:
srtedit subtitles.srt -s 1 --edit "New text" --offset 1000 --view -o modified.srt
Will set the text of the first element to "New text" then add 1 second to the start and end times and then display the new values to the terminal and then finally write it to modified.srt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srtedit-0.2.0.tar.gz.
File metadata
- Download URL: srtedit-0.2.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.5 Linux/6.12.41+deb13-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e85dfa6ed373bea2171104f81f88d7a7191d795fdc2f535f253a3bde24406f43
|
|
| MD5 |
6f720718d03d1d041d98c58c01e418a4
|
|
| BLAKE2b-256 |
5892234d87d13c29fdb72bb25f514827f9b812cc07fbd0c99531c5c7e932b8e8
|
File details
Details for the file srtedit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: srtedit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.5 Linux/6.12.41+deb13-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07bed29a1db5831ff9942e0789b41e7fdc34fdaedf8447704b489388e1fcdd49
|
|
| MD5 |
f840d81b7bc227793b5beba810984a86
|
|
| BLAKE2b-256 |
0273850c02fdc4a351eafe7e6d793aa24b3751d90b4d19fe344e1fa3fcaa920b
|