Skip to content

Commit 78599f3

Browse files
committed
added SRTFormatter to README
1 parent f92fe21 commit 78599f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ transcript = transcript_list.find_generated_transcript(['de', 'en'])
161161
```
162162

163163
### Using Formatters
164-
Formatters are meant to be an additional layer of processing of the transcript you pass it. The goal is to convert the transcript from its Python data type into a consistent string of a given "format". Such as a basic text (`.txt`) or even formats that have a defined specification such as JSON (`.json`), WebVTT format (`.vtt`), Comma-separated format (`.csv`), etc...
164+
Formatters are meant to be an additional layer of processing of the transcript you pass it. The goal is to convert the transcript from its Python data type into a consistent string of a given "format". Such as a basic text (`.txt`) or even formats that have a defined specification such as JSON (`.json`), WebVTT (`.vtt`), SRT (`.srt`), Comma-separated format (`.csv`), etc...
165165

166166
The `formatters` submodule provides a few basic formatters to wrap around you transcript data in cases where you might want to do something such as output a specific format then write that format to a file. Maybe to backup/store and run another script against at a later time.
167167

@@ -170,7 +170,8 @@ We provided a few subclasses of formatters to use:
170170
- JSONFormatter
171171
- PrettyPrintFormatter
172172
- TextFormatter
173-
- WebVTTFormatter (a basic implementation)
173+
- WebVTTFormatter
174+
- SRTFormatter
174175

175176
Here is how to import from the `formatters` module.
176177

@@ -182,6 +183,7 @@ from youtube_transcript_api.formatters import Formatter
182183
from youtube_transcript_api.formatters import JSONFormatter
183184
from youtube_transcript_api.formatters import TextFormatter
184185
from youtube_transcript_api.formatters import WebVTTFormatter
186+
from youtube_transcript_api.formatters import SRTFormatter
185187
```
186188

187189
### Provided Formatter Example

0 commit comments

Comments
 (0)