srtshifter 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +49 -17
- data/lib/srtshifter/subtitle.rb +3 -3
- data/lib/srtshifter/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,29 +1,61 @@
|
|
1
|
-
#
|
1
|
+
# SRT Shifter
|
2
2
|
|
3
|
-
|
3
|
+
How many times you downloaded a movie that you couldn't find a perfect synchronized subtitle to watch it?
|
4
4
|
|
5
|
-
|
5
|
+
SRT Shifter is an open-source command-line tool that fixes the timming of your SubRip files!
|
6
6
|
|
7
|
-
|
7
|
+
##Pre-requisites
|
8
8
|
|
9
|
-
|
9
|
+
Install [Ruby Gems](https://rubygems.org/ "Ruby Gems") package manager installed in your system
|
10
10
|
|
11
|
-
|
11
|
+
##Instalation
|
12
12
|
|
13
|
-
|
13
|
+
To install, just type:
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
$ gem install strshifter
|
15
|
+
$ gem install srtshifter
|
18
16
|
|
19
17
|
## Usage
|
20
18
|
|
21
|
-
|
19
|
+
On the command-line, type the command below to get more information.
|
20
|
+
|
21
|
+
$ srtshifter --help
|
22
|
+
|
23
|
+
This example generates a new srt file called new_sub.srt, with 2.5 milliseconds shifted ahead
|
24
|
+
from original_sub.srt file.
|
25
|
+
|
26
|
+
$ strshifter -o ADD -t 2.5 original_sub.srt new_sub.srt
|
27
|
+
|
28
|
+
## Future ideas and "to do"s'
|
29
|
+
|
30
|
+
1. Create a self-instalation script
|
31
|
+
2. Add more operations flexible operations (i.e: Edit specific part of the file)
|
32
|
+
|
33
|
+
##How to contribute
|
34
|
+
Please ensure that you provide appropriate test coverage and ensure the documentation is up-to-date. It is encouraged that you perform changes in a clean topic branch rather than a master and that you create a pull request for them. This will facilitate discussion and revision.
|
35
|
+
|
36
|
+
Please be clean, keep your commits atomic and with the smallest possible logical change. This will increase the likelihood of your submission to be used.
|
37
|
+
|
38
|
+
###Bug reports
|
39
|
+
|
40
|
+
If you discover any bugs, feel free to create an issue on GitHub. Please add as much information as possible to help us fixing the possible bug.
|
41
|
+
|
42
|
+
https://github.com/thiagokimo/srt-shifter/issues
|
43
|
+
|
44
|
+
##License
|
45
|
+
Copyright (c) 2012 Thiago Moreira Rocha.
|
46
|
+
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
48
|
+
a copy of this software and associated documentation files (the
|
49
|
+
"Software"), to use, copy and modify copies of the Software, subject
|
50
|
+
to the following conditions:
|
22
51
|
|
23
|
-
|
52
|
+
The above copyright notice and this permission notice shall be
|
53
|
+
included in all copies or substantial portions of the Software.
|
24
54
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
55
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
56
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
57
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
58
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
59
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
60
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
61
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/srtshifter/subtitle.rb
CHANGED
@@ -23,10 +23,10 @@ module SrtShifter
|
|
23
23
|
output_file.write(line)
|
24
24
|
else
|
25
25
|
new_start_time = convert_time $1
|
26
|
-
|
27
|
-
|
26
|
+
new_end_time = convert_time $2
|
27
|
+
new_line = "#{new_start_time} --> #{new_end_time}\n"
|
28
28
|
|
29
|
-
|
29
|
+
output_file.write(new_line)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
data/lib/srtshifter/version.rb
CHANGED