|
1 | 1 | # About
|
2 | 2 |
|
3 |
| -Subber is a cli tool and library for reading, |
4 |
| -writing and manipulating .srt subtitle files written in Go |
| 3 | +Subtitles is a go library for handling .srt and .ssa subtitles |
5 | 4 |
|
6 | 5 | WARNING: The API is unstable, work in progress!
|
7 | 6 |
|
8 |
| -### Features |
9 |
| - |
10 |
| -- Processes .srt and .ssa subtitles |
11 |
| -- Cleans up the captions |
12 |
| -- Optionally remove html tags or fix capitalization |
13 |
| -- Outputs utf8 subtitle in the popular .srt format |
14 |
| - |
15 |
| - |
16 |
| -### Why? |
17 |
| - |
18 |
| -While VLC may swallow all kinds of malformed subtitles, |
19 |
| -not all software are so forgiving. |
20 |
| -So, sometimes "other software" needs a cleaned up .srt, |
21 |
| -and the `subber` cli app automates this task. |
22 |
| - |
23 | 7 |
|
24 | 8 | # Installation
|
25 | 9 |
|
26 |
| -To install the command line: |
27 |
| - |
28 |
| -``` |
29 |
| -go install github.com/martinlindhe/subber/cli/subber |
30 |
| -``` |
31 |
| - |
32 |
| - |
33 |
| -# Usage |
34 |
| - |
35 |
| -To download subtitles for a video file: |
36 |
| - |
37 |
| -``` |
38 |
| -$ subber movie.mp4 |
39 |
| -
|
40 |
| -Downloading subs for movie.mp4 ... |
41 |
| -Cleaning sub movie.srt ... |
42 |
| -Removing caption 82 [== sync, corrected by <font color="#00FF00">elderman</font> ==] |
43 |
| -Written to movie.srt |
44 |
| -``` |
45 |
| - |
46 |
| -Some additional flags (use `-h` for full list) includes: |
47 |
| - |
48 |
| - * `--keep-ads` do not remove advertising segments from the processesed sub |
49 |
| - * `--dont-touch` write sub as-is (downloaded are processed by default)` |
50 |
| - * `--skip-backups` by default, a .org file is created for every modified .srt |
51 |
| - * `--language="sv"` Specify another language, English subtitles is the default |
52 |
| - |
53 |
| - |
54 |
| -Remove ads from an existing .srt file: |
55 |
| - |
56 |
| -``` |
57 |
| -$ subber subtitle.srt |
58 |
| -
|
59 |
| -Removing caption 21 [<font color="#FFFF00"> Captions by VITAC </font><font color="#00FFFF"> www.vitac.com</font>] |
60 |
| -``` |
61 |
| - |
62 |
| -Strip html tags from .srt: |
63 |
| - |
64 |
| -``` |
65 |
| -$ subber subtitle.srt --filter="html" |
66 |
| -
|
67 |
| -[html] <i>And there's a lot of it there.</i> -> And there's a lot of it there. |
68 | 10 | ```
|
69 |
| - |
70 |
| -Normalize capitalization in .srt: |
71 |
| - |
| 11 | +go get github.com/martinlindhe/subtitles |
72 | 12 | ```
|
73 |
| -$ subber subtitle.srt --filter="caps" |
74 |
| -
|
75 |
| -[caps] INTRODUCING -> Introducing |
76 |
| -[caps] right, to go? -> Right, to go? |
77 |
| -``` |
78 |
| - |
79 |
| - |
80 |
| -# Contributing |
81 |
| - |
82 |
| -Patches welcome! |
83 |
| - |
84 |
| -Some ideas, in no particular order: |
85 |
| - |
86 |
| -- automatically convert downloaded .ssa files to .srt |
87 |
| -- filter: spell fixer |
88 |
| -- filter: remove hearing aid tags [DOOR OPENS] |
89 |
| -- make -v (verbose mode) have any effect |
90 | 13 |
|
91 | 14 |
|
92 | 15 | # See also
|
93 | 16 |
|
| 17 | +- [subber](https://github.com/martinlindhe/subber) command line tool for subtitles |
94 | 18 | - [ssa2srt](https://github.com/martinlindhe/ssa2srt) for converting .ssa to .srt
|
95 | 19 |
|
96 | 20 |
|
|
0 commit comments