-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbackend.html
executable file
·157 lines (145 loc) · 5.09 KB
/
backend.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="description" content="" />
<meta name="author" content="" />
<title>HSK Glossary Backend | Chinese Zero to Hero</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/hsk-dictionary.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.css"/>
</head>
<body>
<!-- Page Content -->
<div class="container-fluid top-bar">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h1 class="title">
<a href="https://www.chinesezerotohero.com">
<img src="img/logo-mark.png" class="logo" alt="" />
</a>
<span class="title-text">HSK Backend Tools</span>
</h1>
</div>
</div>
</div>
</div>
<div id="save-images">
<div class="container mt2 mb2">
<div class="row">
<div class="col-sm-12">
<h4>Save Images for Words</h4>
<button class="btn btn-primary load-words-button" v-on:click="loadWordsClick">Load Words</button>
<table class="table mt2" v-if="words.length > 0">
<thead>
<tr>
<th>Word</th>
<th>Simple English</th>
<th><button class="btn btn-primary" v-on:click="getAllClick">Get All</th>
</tr>
</thead>
<tbody>
<tr v-for="word in words" :data-id="word.id" v-if="!word.hasPhoto">
<td>{{ word.word }}</td>
<td>{{ word.simpleEnglish }}</td>
<td>
<button class="btn btn-primary get-photo-button" v-if="!word.hasPhoto" :data-id="word.id" v-on:click="getPhotoClick">Get photo</button>
<span v-else>Has photo: {{ word.photo }}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div><!-- #save-images -->
<hr>
<div id="concat">
<div class="container mt2">
<div class="row">
<div class="col-sm-12">
<h4>Concatenate LRC files to JSON (Deprecated)</h4>
<div class="input-group mb-3">
<input type="file" id="lrc-file-input" multiple />
<div class="input-group-append">
<button
v-on:click="concatenateButtonClick"
class="btn btn-primary"
type="button"
>
Concatenate
</button>
</div>
</div>
</div>
</div>
</div>
</div><!-- #concat -->
<hr>
<div id="audit">
<div class="container">
<div class="row mt2">
<div class="col-sm-12">
<h4>Audit LRCs (Deprecated)</h4>
<p>Audit the lrc-compiled.json file .</p>
<button
v-on:click="auditeButtonClick"
class="btn btn-primary"
type="button"
>
Audit
</button>
<table v-if="audited" class="table mt2 datatable">
<thead>
<tr>
<th>Songs</th>
<th>Songs with YouTube</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ totalCount }}</td>
<td>{{ youtubeCount }}</td>
</tr>
</tbody>
</table>
{{ wordsWithNoSong.length }}
<table v-if="audited" class="table mt2 datatable">
<thead>
<tr>
<th>Word</th>
<th v-on:click="tableHeadingClick">Has LRC with YouTube</th>
</tr>
</thead>
<tbody>
<tr v-for="word in words">
<td>{{ word.word }}</td>
<td>{{ word.matches.length }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div><!-- #audit -->
</div>
<div id="lyricer"></div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="vendor/vue/vue.js"></script>
<script src="vendor/papaparse/papaparse.min.js"></script>
<script src="vendor/lyricer/lyricer.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/datatables.min.js"></script>
<script src="js/hsk.js"></script>
<script src="js/backend.js"></script>
<script src="https://apis.google.com/js/client.js?onload=init"></script>
<script></script>
</body>
</html>