-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
181 lines (159 loc) · 7.05 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" type="text/css" href="dist/semantic.min.css">
<link rel="stylesheet" href="style.css">
<title>ORACC PDF Generator</title>
</head>
<body style="background-color: #eee">
<div class="ui raised padded text container segment">
<div class="segment">
<div class="ui fluid rounded image">
<a class="ui blue ribbon label" href="http://cdli.ucla.edu/P227533">CBS 16106</a>
<img src="cbs16106.jpg">
</div>
</div>
<div class="ui header">
ORACC PDF generator
</div>
<p class=" vertically padded">This tool will let you create PDFs based on selected texts from the ORACC corpora.
At the moment it's quite basic, it just loads the text data from the projects individual text JSON files.
Some projects have cuneiform signs included, some have normalization, some only have transliteration.
Right now the tool is not smart enough to tell you what's available before it generates the PDF.
<br>
<br>
This tool can be used to create PDFs of texts for classroom use, or personal study and reading.
All texts are credited according to the information in the ORACC JSON file.
The general workflow is as follows:
<ol>
<li>Select a corpus to load. This will download and unzip the corpus file from the ORACC Github
<a href="https://github.com/oracc/json">repository</a> in the background and populate a list
of texts from that archive.
</li>
<li>Select one or more texts to include in your PDF. It can be useful here to use your webbrowser's
find feature (usually Ctrl-F or Command-F) to search for texts. When you've selected the texts
you want, scroll to the bottom of the list and hit "Submit".
</li>
<li>Select the options for the PDF: page size, and which lines from the text to include (cuneiform,
transliteration, normalization). Press "Generate PDF" and wait for the download button to become
active.
</li>
</ol>
This tool was created by Willis Monroe, and I'd be grateful for any feedback. Is there a particular corpus
or text that breaks the PDF output? Is there an additional needed option? Could the workflow be improved?
<br>
<br>
Send any issues/queries/improvements my way, either by e-mail, or by using Github's
<a href="https://github.com/willismonroe/oracc-pdf-generator/issues">issue tracker</a>.
</p>
<div class="ui fluid styled accordion">
<div class="title active" id="step_one_title">
<i class="dropdown icon"></i>
Step 1 - select a corpus
</div>
<div class="content active" id="step_one_content">
<p>Select a corpus here:</p>
<!--<div class="ui search">-->
<!--<div class="ui icon input">-->
<!--<input class="prompt" type="text" placeholder="Project name..." id="step_one_search" onkeyup="filterCorpora()">-->
<!--<i class="search icon"></i>-->
<!--</div>-->
<!--</div>-->
<br>
<span id="step_one_body"></span>
<div id="step_one_spinner" class="ui inverted dimmer">
<div class="ui text loader">Loading Corpora</div>
</div>
</div>
<div class="title">
<i class="dropdown icon"></i>
Step 2 - select text(s)
</div>
<div class="content" id="step_two_content">
<p>Select any number of texts:</p>
<span id="step_two_body"></span>
<div class="ui blue button" id="submit_texts">Submit</div>
<!--<div id="step_two_spinner" class="ui inverted dimmer">-->
<!--<div class="ui text loader">Loading Texts</div>-->
<!--</div>-->
</div>
<div class="title">
<i class="dropdown icon"></i>
Step 3 - format pdf
</div>
<div class="content" id="step_three_content">
<p>Choose PDF formatting options:</p>
<span id="step_three_body"> </span>
<div class="ui divider"></div>
<div class="ui form">
<div class="inline fields">
<label>Select your page size:</label>
<div class="field">
<div class="ui radio checkbox" id="A4">
<input type="radio" name="page_size">
<label>A4</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox checked" id="LETTER">
<input type="radio" name="page_size" checked="checked">
<label>Letter</label>
</div>
</div>
</div>
<span id="text_lines">
<div class="inline field">
<div class="ui toggle checkbox checked" id="cuneiform">
<input type="checkbox" checked="checked">
<label>Cuneiform</label>
</div>
</div>
<div class="inline field">
<div class="ui toggle checkbox checked" id="transliteration">
<input type="checkbox" checked="checked">
<label>Transliteration</label>
</div>
</div>
<div class="inline field">
<div class="ui toggle checkbox checked" id="normalization">
<input type="checkbox" checked="checked">
<label>Normalization</label>
</div>
</div>
<div class="inline field">
<div class="ui toggle checkbox checked" id="vocabulary">
<input type="checkbox" checked="checked">
<label>Vocabulary</label>
</div>
</div>
</span>
<div class="ui divider"></div>
<div class="ui green button" id="generate_pdf">Generate PDF</div>
<a class="ui disabled blue button " id="download_button">Download PDF</a>
</div>
</div>
</div>
</div>
<script src="dist/jquery-3.3.1.min.js"></script>
<script src="dist/jszip.min.js"></script>
<!--<script src="dist/jspdf.min.js"></script>-->
<script src="dist/pdfkit.js"></script>
<script src="dist/blob-stream.js"></script>
<script src="dist/semantic.min.js"></script>
<script src="script.js" type="module"></script>
<script language="javascript">
$('.ui.accordion')
.accordion()
;
$('.ui.checkbox')
.checkbox()
;
$('.ui.dropdown')
.dropdown()
;
</script>
</body>
</html>