-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
239 lines (204 loc) · 8.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!DOCTYPE html>
<html ng-app="subsliderJS" itemscope itemtype="http://schema.org/Product">
<head lang="en">
<meta charset="UTF-8">
<meta itemprop="name" content="subslider.js">
<meta itemprop="description"
content="Fix your out-of-sync subtitles online with a free, open-source tool!">
<meta itemprop="image"
content="http://micheleb.github.io/subslider.js/img/subsliderjs.png">
<meta property="og:title" content="subslider.js"/>
<meta property="og:image"
content="http://micheleb.github.io/subslider.js/img/subsliderjs.png"/>
<meta property="og:description"
content="Fix your out-of-sync subtitles online with a free, open-source tool!"/>
<title>Subslider.js</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700'
rel='stylesheet' type='text/css'>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
<script src="lib/pagination/dirPagination.js"></script>
<script src="lib/ui-bootstrap/ui-bootstrap-custom-0.13.0.min.js"></script>
<script
src="lib/ui-bootstrap/ui-bootstrap-custom-tpls-0.13.0.min.js"></script>
<script src="main_ng.js"></script>
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container" ng-controller="FileUploadController" class="container">
<div class="title">Subslider.js</div>
<div class="desc">
<p>
Subslider.js is a simple script to fix out-of-sync subtitles in the
.srt format.
</p>
<p>
Load your .srt file using the dialog below, and follow the instructions.
</p>
<p>
(Read <a
href="https://somethingididnotknow.wordpress.com/2015/10/25/fix-out-of-sync-subtitles-with-angular/">this
blog post</a> if you're interested in why I made this page)
</p>
</div>
<div class="load_area">
<div id="drop_zone" class="drop_zone"
dropzone
on-file-drop="fileDropped">
{{ uploadedFile.name }}
</div>
<div class="load_or">
or...
</div>
<button type="button"
class="btn btn-primary btn-lg"
onclick="document.getElementById('fileChooser').click()">Choose
file…</button>
<input class="fileInput" type="file" id="fileChooser" name="file"
accept="application/x-subrip"
file-uploader
on-file-chosen="fileDropped"/>
</div>
<div class="show_on_file_loaded" ng-if="fileUpload.fileUploaded">
<h2>How to sync your subtitles</h2>
<p>
<ol>
<li>Play your video with subtitles enabled, and skip to a dialog</li>
<li>Take note of the exact time at which they start talking</li>
<li>Find that dialog in the table below (use search!),
and select it
</li>
<li>Change the <span class="italic">start at</span> field to the
time at which the dialog starts (and hence, at which the subtitle
should start being displayed)
</li>
<li>Press submit</li>
</ol>
</p>
<div class="controls">
<div
ng-class="{true: 'has-success', false: 'has-error'}[start.timestamp !== undefined]">
<label for="startat">Start at</label>
<input type="text" id="startat" name="startat"
class="form-control" placeholder="format is 01:23:45,678"
ng-model="start.timestamp" validate-time-format/>
</div>
<div
ng-class="{true: 'has-success', false: 'has-error'}">
<label for="index">Index start (default 1)</label>
<input type="number" id="index" name="index"
class="form-control" ng-model="start.index" required/>
</div>
<div>
<button type="button"
ng-class="{'disabled': !selectedSub.id || start.timestamp === undefined || start.timestamp === selectedSub.from}"
ng-click="onSubmit()"
class="btn btn-primary btn-lg">Submit
</button>
<div id="subs-generated">
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<h3 class="modal-title">Subtitles successfully processed!</h3>
</div>
<div class="modal-body">
<p>Your subtitles are ready.</p>
<p>
Click the "Download .srt" button below to download your new
subtitles, or copy the content of the text area further
below and paste it to a new .srt file using a text editor.
</p>
<div>
<button class="btn btn-primary"
ng-click="saveSrtFile()">Download
.srt
</button>
</div>
<div>
<textarea class="raw_subs"
ng-model="editedSubs.rawText"
select-on-click></textarea>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="cancel()">Close</button>
</div>
</script>
</div>
</div>
</div>
<div id="processed_subs" class="processed_subs"
ng-controller="PaginationController">
<div class="row">
<div class="col-xs-4">
<label for="search">Search:</label>
<input ng-model="q" id="search" class="form-control"
placeholder="Filter text">
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<table>
<tbody>
<tr class="header">
<th scope="col" title="Id">id</th>
<th scope="col" title="Starts">starts</th>
<th scope="col" title="Ends">ends</th>
<th scope="col" title="Lines" class="dialogLine">lines</th>
</tr>
<tr
dir-paginate="subtitle in subtitles | filter:q | itemsPerPage: pageSize"
current-page="currentPage"
ng-click="setSelected(subtitle)"
ng-class="{'selected_row': subtitle.id === selectedSub.id}">
<td>{{ subtitle.id }}</td>
<td>{{ subtitle.from | date:"HH:mm:ss,sss":'UTC' }}</td>
<td>{{ subtitle.to | date:"HH:mm:ss,sss":'UTC' }}</td>
<td class="dialogLine">{{ subtitle.dialogLines }}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="pagination_controls">
<div class="text-center">
<dir-pagination-controls
boundary-links="true"
on-page-change="pageChangeHandler(newPageNumber)"
template-url="lib/pagination/dirPagination.tpl.html">
</dir-pagination-controls>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="small">
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
<img alt="Creative Commons License"
src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/>
</a>
<p>
This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
Creative Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
<p>
Copyright © 2015 - <a href="http://michelebonazza.com">Michele
Bonazza</a>
</p>
</div>
</footer>
<a href="https://github.com/micheleb/subslider.js">
<img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png">
</a>
<script xmlns="http://www.w3.org/1999/xhtml" type="application/ecmascript"
async="" src="lib/fileSaver.js/Blob.js"></script>
<script xmlns="http://www.w3.org/1999/xhtml" type="application/ecmascript"
async="" src="lib/fileSaver.js/FileSaver.min.js"></script>
</body>
</html>