Skip to content

Commit 2b8b23c

Browse files
committed
moved subber to separate package
1 parent ad2b294 commit 2b8b23c

File tree

3 files changed

+3
-213
lines changed

3 files changed

+3
-213
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,20 @@
11
# About
22

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
54

65
WARNING: The API is unstable, work in progress!
76

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-
237

248
# Installation
259

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.
6810
```
69-
70-
Normalize capitalization in .srt:
71-
11+
go get github.com/martinlindhe/subtitles
7212
```
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
9013

9114

9215
# See also
9316

17+
- [subber](https://github.com/martinlindhe/subber) command line tool for subtitles
9418
- [ssa2srt](https://github.com/martinlindhe/ssa2srt) for converting .ssa to .srt
9519

9620

cli/subber/subber.go

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)