-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (36 loc) · 2.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>YouTube Transcript to SRT</title>
<link rel="stylesheet" href="dist/bootstrap-5.2.3/css/bootstrap.min.css">
<link rel="stylesheet" href="css/main.css">
<script src="dist/vue-3.5.3/vue.global.js"></script>
</head>
<body>
<div id="yt-srt" class="container-fluid pt-2" v-cloak>
<h3>YouTube Transcript to SRT</h3>
<p>Convert YouTube timedtext API responses into SubRip Subtitle (SRT) format. See <a href="https://github.com/kulotsystems/yt-srt?tab=readme-ov-file#how-to-use" target="_blank" class="fw-bold">how to</a>.</p>
<div class="row">
<div class="col-md-6 pb-3">
<div class="mb-1 d-flex justify-content-between align-items-center">
<label for="txt-timedtext" class="fw-bold">YouTube timedtext API Response:</label>
<button class="btn btn-sm" style="visibility: hidden"> </button>
</div>
<textarea v-model="input.text" @keyup="processTimedText" class="form-control border-primary" ref="txt-timedtext" id="txt-timedtext" rows="24"></textarea>
</div>
<div class="col-md-6">
<div class="mb-1 d-flex justify-content-between align-items-center">
<label for="txt-result" class="fw-bold">SRT Result:</label>
<button @click="copyOutput" class="btn btn-sm btn-outline-primary" :disabled="copying || hasError || input.text === ''">Copy</button>
</div>
<textarea v-if="hasError" class="form-control text-danger" ref="txt-error" id="txt-error" rows="24" readonly>{{ error.message }}</textarea>
<textarea v-else class="form-control" :class="{ 'border-primary': copying }" ref="txt-result" id="txt-result" rows="24" readonly>{{ output.text }}</textarea>
</div>
</div>
</div>
<script src="js/main.js"></script>
<script src="dist/bootstrap-5.2.3/js/bootstrap.bundle.min.js"></script>
</body>
</html>