Swiftpack.co - Yang-Xijie/SrtProcess as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Yang-Xijie.
Yang-Xijie/SrtProcess 1.3.0
parse SubRip subtitles (srt) [Swift Package]
⭐️ 0
🕓 6 days ago
iOS macOS
.package(url: "https://github.com/Yang-Xijie/SrtProcess.git", from: "1.3.0")

SrtProcess

SrtProcess is a Swift Package which you can use to parse SRT (SubRip file format).

Usage:

let srt = """
1
00:00:00,720 --> 00:00:01,620
line1 some text
"""
let nodes = try! srt.srtNodes()
print(nodes)
// [SrtProcess.SrtProcess.SrtNode(index: 1, 
//                                interval: SrtProcess.SrtProcess.SrtInterval(
//                                      start: SrtProcess.SrtProcess.SrtTime(hours: 0, minutes: 0, seconds: 0, milliseconds: 720), 
//                                      end: SrtProcess.SrtProcess.SrtTime(hours: 0, minutes: 0, seconds: 1, milliseconds: 620)), 
//                                text: "line1 some text")]

References

GitHub

link
Stars: 0
Last commit: 6 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics