Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honza/srt.clj
SRT parser in Clojure
https://github.com/honza/srt.clj
Last synced: about 5 hours ago
JSON representation
SRT parser in Clojure
- Host: GitHub
- URL: https://github.com/honza/srt.clj
- Owner: honza
- License: bsd-2-clause
- Created: 2013-03-05T02:58:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-10T11:59:41.000Z (over 11 years ago)
- Last Synced: 2024-07-16T18:49:47.155Z (4 months ago)
- Language: Clojure
- Size: 121 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
srt.clj
=======A parsatron-based parser for SRT subtitles. SRT goes in, JSON comes out.
*A learning exercise*
Usage
-----$ cat test-subs.srt
1
00:00:01,000 --> 00:00:04,074
Hello world2
00:00:23,690 --> 00:00:27,570
What time is it?$ lein run test-subs.srt
[ {
"content" : "Hello world",
"start" : {
"hours" : 0,
"minutes" : 0,
"seconds" : 1,
"ms" : 0
},
"end" : {
"hours" : 0,
"minutes" : 0,
"seconds" : 4,
"ms" : 74
}
}, {
"content" : "What time is it?",
"start" : {
"hours" : 0,
"minutes" : 0,
"seconds" : 23,
"ms" : 690
},
"end" : {
"hours" : 0,
"minutes" : 0,
"seconds" : 27,
"ms" : 570
}
} ]License
-------BSD, short and sweet