-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc-tool.html
404 lines (394 loc) · 12.9 KB
/
doc-tool.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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<!doctype html>
<html>
<head>
<title>Noah - Document Tool</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1,
user-scalable=no"
/>
<meta name="description" content="Noah's Document Tool" />
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="icon" href="./images/icons/favicon_50_w.webp" />
<style>
label {
margin: 0;
}
input {
font-size: 12pt;
}
table td {
font-size: 12pt;
}
.loader {
display: none;
width: 50px;
height: 50px;
margin: 30px auto;
border: solid 2px #424242;
border-top: solid 2px #1c89ff;
border-radius: 50%;
}
.loader.active {
display: flex;
animation: loading 1s ease-in-out;
animation-iteration-count: infinite;
}
@keyframes loading {
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<div id="headers"></div>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.1/css/font-awesome.min.css"
media="all"
rel="stylesheet"
type="text/css"
lazyload
/>
<!-- Main -->
<div id="main">
<div class="inner mobile_only">
<br />
<br />
<div style="max-width: 15%; margin: auto">
<img
loading="lazy"
decoding="async"
src="./assets/documents/folders.png"
alt="Document Find/Replace Tool"
width="100%"
/>
</div>
Hi! Please view this page on desktop or expand the window size in
order to utilize the document find/replace tool.
</div>
<div class="inner desktop_only">
<br />
<br />
<div style="max-width: 15%; margin: auto">
<img
loading="lazy"
decoding="async"
src="./assets/documents/folders.png"
alt="Document Find/Replace Tool"
width="100%"
/>
</div>
<br />
<h2 style="margin: 0">Find / Replace in Word Documents</h2>
<br />
Generate multiple output <code>.docx</code> files by executing
multiple sets of find-replace operations.
<form name="documentToolForm" id="documentToolForm">
<table style="margin: 1em 0">
<tbody>
<tr>
<td>
<label for="template_file">Template File (.docx)</label>
</td>
<td>
<input
type="file"
name="template_file"
id="template_file"
accept=".docx"
required
/>
</td>
</tr>
<tr>
<td>
<label for="replacements_file"
>Replacements File (.csv)</label
>
</td>
<td>
<input
type="file"
name="replacements_file"
id="replacements_file"
accept=".csv"
required
/>
</td>
</tr>
<tr>
<td>
<label for="output_base_fn">Output Base Filename</label>
</td>
<td>
<input
type="text"
name="output_base_fn"
id="output_base_fn"
maxlength="50"
size="30"
placeholder="John Doe Cover Letter"
/>
</td>
</tr>
</tbody>
</table>
<div class="loader"></div>
<div class="align-center">
<input id="doc_tool_submit" type="submit" value="Generate" />
</div>
</form>
<hr style="margin: 2em 0" />
<h5>Example Input</h5>
<div
style="
background-color: #ebf8ff;
border-radius: 10px;
border: solid 1px #c9c9c9;
color: black;
margin: 2em;
"
>
<br />
<div class="row">
<div class="half_text_column align-center" style="width: 25%">
<a
href="./assets/documents/John Doe Cover Letter Template.docx"
download
>
<u>Template File</u>
<code>.docx</code>
</a>
</div>
<div class="half_text_column" style="width: 75%">
<iframe
src="./assets/documents/John Doe Cover Letter Template.pdf"
width="100%"
height="250px"
>
</iframe>
</div>
</div>
<hr />
<div class="row">
<div class="half_text_column align-center" style="width: 25%">
<a
href="./assets/documents/John Doe Cover Letter Replacements.csv"
download
>
<u>Replacements File</u>
<code>.csv</code>
</a>
</div>
<div class="half_text_column" style="width: 75%">
<table>
<tbody>
<tr>
<td>[DATE]</td>
<td>[COMPANY]</td>
<td>[INDUSTRY]</td>
<td>[POSITION]</td>
</tr>
<tr>
<td>January 1st, 2025</td>
<td>Apple</td>
<td>consumer technology</td>
<td>Associate Accountant</td>
</tr>
<tr>
<td>January 1st, 2025</td>
<td>Crunchyroll</td>
<td>anime streaming</td>
<td>Recruiter</td>
</tr>
<tr>
<td>January 1st, 2025</td>
<td>Twitter</td>
<td>social media</td>
<td>Marketing Specialist</td>
</tr>
<tr>
<td>January 1st, 2025</td>
<td>Nike</td>
<td>athletic apparel and footwear</td>
<td>Associate Data Scientist</td>
</tr>
<tr>
<td>January 1st, 2025</td>
<td>Columbia</td>
<td>sportswear</td>
<td>Retail Team Member</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<h5>Example Output</h5>
<div
style="
background-color: #ebfff1;
border-radius: 10px;
border: solid 1px #c9c9c9;
color: black;
margin: 2em;
padding: 2em;
"
>
Five new documents are created since there are five rows in the
<code>Replacements File.csv</code>.
<br />
<br />
The first document has the following substitutions compared to
<code>Template File.docx</code>:
<table
class="data-table"
style="
border-collapse: separate;
border-radius: 1em;
border: solid 1px #c9c9c9;
width: fit-content;
margin-left: 2em;
margin-top: 0.5em;
"
>
<tbody>
<tr>
<td>
[DATE] → January 1st, 2025
<br />
[COMPANY] → Apple
<br />
[INDUSTRY] → consumer technology
<br />
[POSITION] → Associate Accountant
</td>
</tr>
</tbody>
</table>
Document 1 before vs after:
<div class="row" style="margin-top: 1em">
<div
class="half_text_column align-center"
style="width: 30%; padding: 0"
>
<a
href="./assets/documents/John Doe Cover Letter Template.docx"
download
>
<u>John Doe Cover Letter Template.docx</u>
</a>
</div>
<div class="half_text_column" style="width: 70%">
<iframe
src="./assets/documents/John Doe Cover Letter Template.pdf"
width="100%"
height="250px"
>
</iframe>
</div>
</div>
<div class="row" style="margin-bottom: 0.5em; font-size: 26px">
<div class="half_text_column align-center" style="width: 33%">
↓
</div>
<div class="half_text_column align-center" style="width: 33%">
↓
</div>
<div class="half_text_column align-center" style="width: 33%">
↓
</div>
</div>
<div class="row">
<div class="half_text_column align-center" style="width: 30%">
<a
href="./assets/documents/John Doe Cover Letter - Apple - Associate Accountant.docx"
download
>
<u
>John Doe Cover Letter - Apple - Associate
Accountant.docx</u
>
</a>
</div>
<div class="half_text_column" style="width: 70%">
<iframe
src="./assets/documents/John Doe Cover Letter - Apple - Associate Accountant.pdf"
width="100%"
height="250px"
>
</iframe>
</div>
</div>
</div>
<h5>Details</h5>
<div style="margin: 1em">
<div class="row">
<div class="half_text_column" style="width: 85%">
<div style="display: block">
The <code>Template File.docx</code> is the base document from
which the find-replace operations are conducted.
<br />
<br />
The <code>Replacements File.csv</code> specifies the
find-replace operations. Each row specifies a new document to
generate. Each column name specifies the text to replace in
the template. The column values specify the text to substitute
during the replacement.
<br />
<br />
The <code>Output Base Filename</code> is the base filename of
the generated documents.
<br />
<br />
Note that a maximum of 25 documents can be generated at once.
</div>
</div>
<div class="half_image_column" style="width: 15%">
<img
loading="lazy"
decoding="async"
src="./assets/documents/find.png"
alt="Document Find/Replace Tool"
width="100%"
/>
</div>
</div>
</div>
</div>
<br /><br />
<div class="row">
<a href="#top" style="margin-left: 90vw">
<img
srcset="
./images/icons/icon_scroll_up_25_w.webp 25w,
./images/icons/icon_scroll_up_50_w.webp 1000w
"
sizes="1.5em"
loading="lazy"
decoding="async"
src="./images/icons/icon_scroll_up.png"
class="scroll_icon"
alt="Scroll
Up"
style="position: inherit"
/>
</a>
</div>
</div>
<!-- Footer -->
<footer id="footer"></footer>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/doc_tool_form_submission.js"></script>
</body>
</html>