Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alesr/srttotext
Go Utility for Extracting Plain Text from SRT Files
https://github.com/alesr/srttotext
Last synced: about 2 months ago
JSON representation
Go Utility for Extracting Plain Text from SRT Files
- Host: GitHub
- URL: https://github.com/alesr/srttotext
- Owner: alesr
- License: mit
- Created: 2023-08-22T07:38:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-22T13:22:39.000Z (over 1 year ago)
- Last Synced: 2024-05-21T04:15:56.203Z (8 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# srttotext
Go Utility for Extracting Plain Text from SRT FilesThis Go code provides a utility to convert SRT content to plain text by removing timing and sequence number information. The Convert function takes SRT content as a string and returns the extracted textual content.
## Example
```go
func ExampleConvert() {
// Sample SRT content
input := `
1
00:00:01,000 --> 00:00:04,000
Hello, world!2
00:00:05,000 --> 00:00:08,000
This is a test.
`output := Convert(input)
fmt.Println(output)// Output:
// Hello, world! This is a test.
}
```