-
Notifications
You must be signed in to change notification settings - Fork 12
/
converter.html
172 lines (152 loc) · 5.09 KB
/
converter.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
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<head>
<!--<link rel="stylesheet" type="text/css" href="css/main.css" />-->
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
<style type="text/css">
.wrapper {
width: 980px;
background: #ffffff;
margin: 0 auto;
}
.header {
background: black;
color: white;
}
.holder {
margin-top: 50px;
width: 50%;
float: left;
background: #ffffff;
}
.instructions {
padding: 10px;
height: 310px;
font-size: 16px;
line-height: 24px;
}
.footer {
height: 10px;
background: #ffffff;
clear: both;
}
textarea, #rtranscript {
margin-left:10px;
padding: 10px;
outline: 2px dashed #2c3e50;
border: none;margin-top:10px;
}
textarea:hover {
outline: 2px dashed #2c3e50;
border: none;
}
.tab {
border: solid;
border-width:1px;
border-bottom:thick dotted #ffffff;
text-decoration: none;
padding: 4px;
}
a.inactive {
border: none;
text-decoration:underline;
padding: 4px;
}
a {
color: #2c3e50;
}
#transform {
font-size: 24px;
font-weight: bold;
margin-left: 310px;
border: solid;
border-width:2px;
padding: 8px;
text-decoration: none;
}
.controls {
padding-bottom: 30px;
}
#rtranscript {
padding: 8px;
font-size: 16px;
line-height: 20px;
overflow:scroll;
overflow-x:hidden;
height: 500px;
}
#save-button-saving {
width: 48px;
height: 48px;
position: absolute;
top: 0;
right: 0;
background-color: #808080;
background-image: url('/pad/images/ajax-loader-ffffff-on-808080.gif');
background-position: center center;
background-repeat: no-repeat;
display:none;
}
</style>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.0.3.js"></script>
<script type="text/javascript" src="src/converter.js"></script>
</head>
<body>
<div id="wrapper">
<header id="header">
<h1>Hyperaudio Converter</h1>
<div id="save-button">6</div>
<div id="save-button-saving"></div>
</header>
<div class="holder">
<div class="instructions">
<h2>Convert formats into a hypertranscript.</h2>
<p>Paste your <a href="http://en.wikipedia.org/wiki/.srt#SubRip_text_file_format">SRT (subtitle) file</a>, <a href="http://speechmatics.com">Speechmatics</a> JSON or <a href="https://lowerquality.com/gentle/">Gentle</a> JSON into the pane below and press the transform button.</p>
<form>
<!--<p><input id="line-breaks" type="checkbox" name="linebreaks" value="on"> Line breaks in output?</p>-->
<p>
Input Format :
<select id="format-select">
<option value="srt">SRT formatted captions</option>
<option value="speechmatics">Speechmatics JSON</option>
<option value="gentle">Gentle JSON</option>
<option value="google">Google Speech-to-Text</option>
<option value="other">Other</option>
</select>
</p>
<p><input id="word-length" type="checkbox" name="wordlength" value="on"> Take word-length into account when calculating from SRT?</p>
</form>
<h3 id="srt-title" class="entry-title">Paste here ⤵</h3>
</div>
<div class="source-content">
<textarea id="subtitles" class="entry-content" rows="40" cols="54"></textarea>
</div>
</div>
<div class="holder">
<div class="instructions">
<form class="controls">
<p style="margin-top:16px">Paragraph split on delay:</p>
<p>0 <input id="para-split" style="width:430px" type="range" value="2.0" min="0.0" max="10" step="0.1"> 10<br/>
<span style="margin-left:200px" id="current-para-split">2.0</span> seconds</p>
<p><input id="para-punctuation" type="checkbox" name="wordlength" value="on"> Only split paras on text finishing with punctuation. (. ! ?)</p>
</form>
<p><a id="transform" href="#">Transform <img class="transform-spinner" style="display:none" src="/pad/images/ajax-loader-ffffff-on-808080.gif"></a></p>
<h3 id="script-title" class="entry-title">hypertranscript appears here ⤵</h3>
<a id="markup-view" class="tab" href="#">Markup View</a> <a id="rendered-view" class="tab inactive" href="#">Rendered View</a>
</div>
<div class="target-content">
<textarea id="htranscript" class="entry-content" rows="40" cols="54"></textarea>
<div style="display:none" id="rtranscript" contentEditable></div>
</div>
</div>
<div class="footer">
</div>
</div>
<script type="text/javascript" src="lib/purl.js"></script>
<script type="text/javascript" src="src/script.js"></script>
<script type="text/javascript" src="/commons/tools/analytics/ga.js"></script>
</body>
</html>