-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoi-fetcher.html
More file actions
485 lines (428 loc) · 37.9 KB
/
Copy pathdoi-fetcher.html
File metadata and controls
485 lines (428 loc) · 37.9 KB
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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<!DOCTYPE html>
<html lang="en" class="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOI to BibTeX Fetcher | Citation Generator | STEMKit</title>
<meta name="title" content="DOI to BibTeX Fetcher | Citation Generator | STEMKit">
<meta name="description" content="Instantly convert Digital Object Identifiers (DOIs) into correctly formatted BibTeX citations. Build your bibliography directly in the browser with zero server tracking.">
<meta name="keywords" content="doi to bibtex, citation generator, crossref api fetcher, latex bibliography builder, research citation tool, STEMKit">
<link rel="canonical" href="https://stemkit.net/doi-fetcher.html">
<meta property="og:url" content="https://stemkit.net/doi-fetcher.html">
<meta property="twitter:url" content="https://stemkit.net/doi-fetcher.html">
<meta property="og:title" content="DOI to BibTeX Fetcher | Citation Generator">
<meta property="twitter:title" content="DOI to BibTeX Fetcher | Citation Generator">
<meta property="og:description" content="Instantly convert DOIs into perfectly formatted BibTeX citations. Build your library locally.">
<meta property="twitter:description" content="Instantly convert DOIs into perfectly formatted BibTeX citations. Build your library locally.">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "STEMKit DOI Fetcher",
"url": "https://stemkit.net/doi-fetcher.html",
"description": "Instantly convert DOIs into perfectly formatted BibTeX citations.",
"author": { "@type": "Person", "name": "Olanrewaju M. Daramola" },
"applicationCategory": "UtilityApplication",
"operatingSystem": "All",
"browserRequirements": "Requires JavaScript",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"featureList": [ "Crossref API Integration", "Batch DOI Resolution", "Field Filtering", "Error Retry", "Deduplication", "100% Client-Side" ]
}
</script>
<meta name="author" content="Olanrewaju M. Daramola">
<meta name="theme-color" content="#4f46e5">
<meta property="og:type" content="website">
<meta property="og:image" content="https://stemkit.net/assets/og-image.webp">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:image" content="https://stemkit.net/assets/og-image.webp">
<link rel="icon" type="image/x-icon" href="https://stemkit.net/assets/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="https://stemkit.net/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://stemkit.net/assets/favicon-16x16.png">
<link rel="apple-touch-icon" href="https://stemkit.net/assets/apple-touch-icon.png">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/all.min.css">
<style>
@keyframes slideIn { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-enter { animation: slideIn 0.3s forwards; }
/* Delimiter chips */
.delim-chip {
display: inline-flex; align-items: center; gap: 4px;
padding: 6px 14px; border-radius: 9999px; font-size: 12px; font-weight: 600;
cursor: pointer; user-select: none; transition: all 0.15s ease;
}
/* Field filter grid */
.fields-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 4px;
}
.field-toggle {
display: flex; align-items: center; gap: 7px;
padding: 5px 8px; border-radius: 6px; cursor: pointer;
font-size: 12px; font-weight: 500; user-select: none; transition: background 0.15s;
}
.field-toggle:hover { background: rgba(0,0,0,0.04); }
.dark .field-toggle:hover { background: rgba(255,255,255,0.05); }
.field-toggle input[type="checkbox"] {
width: 15px; height: 15px; accent-color: #4f46e5; cursor: pointer; flex-shrink: 0;
}
/* Collapsible body */
.collapse-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
/* Progress bar */
.progress-track { height: 6px; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; width: 0%; }
/* Error report */
.error-report-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; padding: 0 14px; }
.error-report-body.open { max-height: 400px; padding: 10px 14px; overflow-y: auto; }
.error-item { display: flex; gap: 10px; padding: 6px 0; font-size: 12px; align-items: flex-start; }
.error-doi { font-family: monospace; font-weight: 600; min-width: 0; word-break: break-all; flex: 1; }
</style>
<style>
/* STEMKit docs / how-to / FAQ | self-contained styles */
.stk-section { padding: 3rem 0; border-top: 1px solid rgba(148,163,184,.2); }
.stk-wrap { max-width: 80rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.stk-chip { display:inline-flex; align-items:center; gap:.45rem; font-size:.68rem; font-weight:800;
text-transform:uppercase; letter-spacing:.12em; padding:.3rem .7rem; border-radius:9999px;
background:#eef2ff; color:#4338ca; border:1px solid #e0e7ff; }
.dark .stk-chip { background:rgba(67,56,202,.18); color:#a5b4fc; border-color:rgba(99,102,241,.3); }
.stk-h2 { font-size:1.6rem; font-weight:800; letter-spacing:-.02em; margin:.75rem 0 .5rem; }
.stk-lead { max-width:48rem; color:#64748b; line-height:1.6; }
.dark .stk-lead { color:#94a3b8; }
.stk-grid { display:grid; gap:1rem; grid-template-columns:1fr; margin-top:1.5rem; }
@media (min-width:768px){ .stk-grid-3{grid-template-columns:repeat(3,1fr);} .stk-grid-2{grid-template-columns:repeat(2,1fr);} }
.stk-card { border-radius:1rem; border:1px solid rgba(148,163,184,.25); padding:1.4rem; background:#fff; }
.dark .stk-card { background:#0f172a; border-color:rgba(51,65,85,.8); }
.stk-step { display:flex; gap:.85rem; align-items:flex-start; }
.stk-num { width:2rem; height:2rem; border-radius:9999px; display:inline-flex; align-items:center;
justify-content:center; font-weight:800; font-size:.85rem; flex-shrink:0;
background:#4f46e5; color:#fff; }
.stk-step h3 { font-weight:700; font-size:.95rem; margin-bottom:.15rem; }
.stk-step p { font-size:.85rem; color:#64748b; line-height:1.5; }
.dark .stk-step p { color:#94a3b8; }
.stk-note { display:flex; gap:.6rem; align-items:flex-start; font-size:.82rem; line-height:1.55;
background:#fffbeb; border:1px solid #fde68a; color:#92400e; border-radius:.75rem; padding:.9rem 1rem; }
.dark .stk-note { background:rgba(120,53,15,.15); border-color:rgba(180,83,9,.4); color:#fcd34d; }
.stk-faq { border-bottom:1px solid rgba(148,163,184,.22); }
.stk-faq > summary { list-style:none; cursor:pointer; padding:1rem 0; font-weight:600; font-size:.95rem;
display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.stk-faq > summary::-webkit-details-marker { display:none; }
.stk-faq > summary::after { content:"+"; font-weight:700; color:#6366f1; font-size:1.2rem; line-height:1; }
.stk-faq[open] > summary::after { content:"\2212"; }
.stk-faq > div { padding:0 0 1.1rem; font-size:.88rem; line-height:1.6; color:#475569; }
.dark .stk-faq > div { color:#94a3b8; }
.stk-refs { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1rem; }
.stk-refs a { display:inline-flex; align-items:center; gap:.4rem; font-size:.82rem; font-weight:600;
color:#4f46e5; text-decoration:none; border:1px solid #e0e7ff; background:#eef2ff;
padding:.4rem .8rem; border-radius:.6rem; }
.dark .stk-refs a { color:#a5b4fc; background:rgba(67,56,202,.15); border-color:rgba(99,102,241,.3); }
.stk-refs a:hover { text-decoration:underline; }
.stk-byline { font-size:.8rem; color:#94a3b8; margin-top:.35rem; }
.stk-credit { margin-top:2rem; font-size:.8rem; color:#94a3b8; }
/* Method & equations (MathML) */
.stk-math { overflow-x:auto; padding:1rem 1.1rem; margin:.6rem 0 1rem; border:1px solid rgba(148,163,184,.25);
border-radius:.75rem; background:#f8fafc; font-size:1.15rem; }
.dark .stk-math { background:#0f172a; }
.stk-math math { color:inherit; }
.stk-eqn-label { font-size:.9rem; font-weight:600; color:#475569; margin-top:1.1rem; }
.dark .stk-eqn-label { color:#cbd5e1; }
.stk-where { font-size:.85rem; color:#64748b; line-height:1.75; margin-top:.5rem; }
.dark .stk-where { color:#94a3b8; }
.stk-model-list { list-style:none; padding:0; margin:.6rem 0 0; display:grid; gap:.55rem; }
.stk-model-list li { font-size:.92rem; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.stk-model-list b { min-width:9rem; color:#475569; font-weight:600; }
.dark .stk-model-list b { color:#cbd5e1; }
.stk-refs-h { font-weight:700; font-size:1rem; margin-top:1.9rem; margin-bottom:.5rem; }
.stk-refs-list { font-size:.82rem; color:#64748b; line-height:1.75; padding-left:1.2rem; }
.dark .stk-refs-list { color:#94a3b8; }
.stk-refs-list li { margin-bottom:.45rem; }
.stk-refs-list a { color:#4f46e5; text-decoration:none; }
.dark .stk-refs-list a { color:#a5b4fc; }
.stk-refs-list a:hover { text-decoration:underline; }
</style>
<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "HowTo", "name": "How to turn DOIs into BibTeX", "totalTime": "PT2M", "step": [{"@type": "HowToStep", "position": 1, "name": "Paste your DOIs", "text": "One per line, or comma/semicolon/space separated. Bare DOIs and full doi.org URLs both work; duplicates are removed automatically."}, {"@type": "HowToStep", "position": 2, "name": "Choose the delimiter", "text": "Select how your DOIs are separated (or Auto) so they parse correctly."}, {"@type": "HowToStep", "position": 3, "name": "Fetch", "text": "Click Fetch. Entries stream in as they resolve, with a live progress bar and a retry option for any that fail."}, {"@type": "HowToStep", "position": 4, "name": "Filter & export", "text": "Toggle which BibTeX fields to keep, then Copy or Download your references.bib."}]}
</script>
<script type="application/ld+json">
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Does this use a private server?", "acceptedAnswer": {"@type": "Answer", "text": "No STEMKit server is involved. Your browser contacts the public doi.org content-negotiation service directly to resolve each DOI."}}, {"@type": "Question", "name": "Which DOIs are supported?", "acceptedAnswer": {"@type": "Answer", "text": "Any DOI whose registration agency exposes BibTeX via content negotiation, this covers the great majority of Crossref (journal/conference) and many DataCite (dataset) DOIs."}}, {"@type": "Question", "name": "Why did some DOIs fail?", "acceptedAnswer": {"@type": "Answer", "text": "Common causes are a typo, a DOI whose agency doesn't return BibTeX, or a transient network error. Failed DOIs are listed and can be retried in one click."}}, {"@type": "Question", "name": "Can I remove fields like abstract or url?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. The field panel lets you keep only the BibTeX fields you want; filtering is applied to every entry locally."}}, {"@type": "Question", "name": "Are duplicates handled?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. Identical DOIs are detected and removed before fetching, and the count is reported."}}]}
</script>
<link rel="stylesheet" href="src/home.css">
<link rel="stylesheet" href="src/output.css">
</head>
<body class="bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 min-h-screen flex flex-col transition-colors duration-300">
<!-- ════════ NAVIGATION (identical to original) ════════ -->
<nav class="sticky top-0 z-50 w-full bg-white/80 dark:bg-slate-950/80 backdrop-blur-md border-b border-slate-200 dark:border-slate-800 transition-colors duration-300">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16 sm:h-20">
<a href="index.html" class="flex items-center gap-2 hover:opacity-80 transition-opacity">
<div class="bg-indigo-600 text-white p-2 sm:p-2.5 rounded-lg shadow-sm flex items-center justify-center">
<i class="fa-solid fa-flask text-lg sm:text-xl"></i>
</div>
<span class="text-xl sm:text-2xl font-black tracking-tighter text-slate-900 dark:text-white">STEMKit</span>
</a>
<div class="hidden md:flex items-center gap-6 text-sm font-semibold text-slate-600 dark:text-slate-300">
<a href="index.html#data-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Data</a>
<a href="index.html#comp-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Compute</a>
<a href="index.html#pub-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Writing & Citations</a>
<a href="index.html#focus-tools" class="hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">Focus</a>
<div class="h-5 w-px bg-slate-200 dark:bg-slate-700"></div>
<button class="themeToggle p-2 rounded-full hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors" aria-label="Toggle dark mode">
<i class="fa-solid fa-moon dark:hidden text-lg"></i>
<i class="fa-solid fa-sun hidden dark:block text-yellow-400 text-lg"></i>
</button>
<a href="plot-digitizer.html" class="bg-indigo-600 hover:bg-indigo-700 text-white px-5 py-2.5 rounded-full text-sm font-bold transition-all shadow-md hover:shadow-lg">
<i class="fa-solid fa-crosshairs mr-1"></i> Plot Digitizer
</a>
</div>
<div class="flex items-center gap-2 md:hidden">
<button class="themeToggle p-2 rounded-full hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors text-slate-600 dark:text-slate-300">
<i class="fa-solid fa-moon dark:hidden text-lg"></i>
<i class="fa-solid fa-sun hidden dark:block text-yellow-400 text-lg"></i>
</button>
<button id="mobile-menu-btn" class="text-slate-600 dark:text-slate-300 hover:text-indigo-600 p-2 focus:outline-none">
<i class="fa-solid fa-bars text-2xl" id="menu-icon"></i>
</button>
</div>
</div>
</div>
<div id="mobile-menu" class="hidden md:hidden bg-white/95 dark:bg-slate-900/95 backdrop-blur-md border-b border-slate-200 dark:border-slate-800 absolute w-full shadow-xl">
<div class="px-4 pt-2 pb-6 space-y-2 text-base font-semibold text-slate-600 dark:text-slate-300">
<a href="index.html#data-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Data & Stats</a>
<a href="index.html#comp-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Compute</a>
<a href="index.html#pub-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Writing & Citations</a>
<a href="index.html#focus-tools" class="mobile-link block py-3 px-4 rounded-xl hover:bg-slate-50 dark:hover:bg-slate-800 hover:text-indigo-600 transition-colors">Focus & Flow</a>
<div class="pt-4 mt-2 border-t border-slate-100 dark:border-slate-800">
<a href="plot-digitizer.html" class="block text-center bg-indigo-600 hover:bg-indigo-700 text-white py-3 rounded-xl shadow-md transition-colors">Digitizer Pro</a>
</div>
</div>
</div>
</nav>
<!-- ════════ MAIN CONTENT ════════ -->
<main class="flex-grow max-w-7xl mx-auto px-6 py-8 w-full flex flex-col gap-6">
<div class="mb-4">
<h1 class="text-3xl font-bold mb-2">DOI to BibTeX Fetcher</h1>
<p class="text-slate-500 dark:text-slate-400">Batch-resolve DOIs into formatted BibTeX. Paste one or hundreds, choose your delimiter, filter fields, and export a clean <code class="text-xs bg-slate-100 dark:bg-slate-800 px-1.5 py-0.5 rounded">.bib</code> file.</p>
<p class="text-xs text-slate-400 mt-3">Resolves via doi.org</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-12 gap-8">
<!-- ──── LEFT COLUMN ──── -->
<div class="lg:col-span-5 flex flex-col gap-6">
<!-- Input card -->
<div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl p-6 shadow-sm">
<h2 class="text-lg font-semibold mb-4">1. Enter DOIs</h2>
<div class="flex flex-col gap-4">
<div>
<label class="block text-xs font-bold text-slate-500 uppercase tracking-wider mb-2">Paste DOIs (one per line, or use a delimiter below)</label>
<textarea id="doiInput" rows="7" class="w-full bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg px-4 py-3 text-sm font-mono focus:ring-2 focus:ring-indigo-500 outline-none resize-y" placeholder="10.1038/s41586-020-2649-2 10.1021/acs.jpcc.9b03054 10.1126/science.288.5468.1029 Or paste comma-separated: 10.xxxx/abc, 10.yyyy/def, 10.zzzz/ghi"></textarea>
<p class="text-[11px] text-slate-400 mt-2">Supports raw DOIs or full URLs (e.g., https://doi.org/10…). Duplicates are auto-removed.</p>
</div>
<!-- Delimiter selector -->
<div>
<label class="block text-xs font-bold text-slate-500 uppercase tracking-wider mb-2">How are your DOIs separated?</label>
<div class="flex flex-wrap gap-2" id="delimRow">
<button class="delim-chip bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-700" data-delim="newline">New line</button>
<button class="delim-chip bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-700" data-delim="comma">Comma <code class="text-[10px]">,</code></button>
<button class="delim-chip bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-700" data-delim="semicolon">Semicolon <code class="text-[10px]">;</code></button>
<button class="delim-chip bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 border border-slate-200 dark:border-slate-700" data-delim="space">Space</button>
</div>
</div>
<button id="fetchBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white w-full py-3 rounded-xl font-bold transition-colors shadow-sm flex items-center justify-center">
<i class="fa-solid fa-cloud-arrow-down mr-2"></i> Fetch All
</button>
<!-- Progress bar -->
<div id="progressWrapper" class="hidden">
<div class="progress-track bg-slate-200 dark:bg-slate-700 w-full">
<div class="progress-fill bg-indigo-600" id="progressFill"></div>
</div>
<p class="text-xs text-slate-400 mt-1.5 font-medium tabular-nums" id="progressText">0 / 0</p>
</div>
</div>
</div>
<!-- Field filter card -->
<div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl p-6 shadow-sm">
<div class="flex justify-between items-center cursor-pointer select-none" id="fieldsTrigger">
<h2 class="text-lg font-semibold">2. Filter BibTeX Fields</h2>
<i class="fa-solid fa-chevron-down text-xs text-slate-400 transition-transform duration-200" id="fieldsArrow"></i>
</div>
<div class="collapse-body" id="fieldsBody">
<p class="text-[11px] text-slate-400 mt-3 mb-3">Uncheck fields to strip from every entry. Changes apply to existing and future entries.</p>
<div class="fields-grid text-slate-600 dark:text-slate-300" id="fieldsGrid"></div>
<div class="flex gap-2 mt-3">
<button id="selectAllFields" class="text-xs font-medium text-indigo-600 dark:text-indigo-400 hover:underline">Select all</button>
<span class="text-slate-300 dark:text-slate-600">|</span>
<button id="deselectOptional" class="text-xs font-medium text-indigo-600 dark:text-indigo-400 hover:underline">Essential only</button>
</div>
</div>
</div>
</div>
<!-- ──── RIGHT COLUMN ──── -->
<div class="lg:col-span-7 flex flex-col h-full">
<div class="bg-white dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-2xl p-6 shadow-sm flex flex-col flex-grow min-h-[500px]">
<div class="flex justify-between items-center mb-4 flex-wrap gap-2">
<h2 class="text-lg font-semibold">3. Accumulated Bibliography</h2>
<div class="flex items-center gap-2">
<span id="entryCount" class="bg-indigo-100 dark:bg-indigo-900/50 text-indigo-700 dark:text-indigo-400 px-3 py-1 rounded-full text-xs font-bold">0 Entries</span>
<span id="failCount" class="hidden bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400 px-3 py-1 rounded-full text-xs font-bold">0 Failed</span>
</div>
</div>
<!-- Dedup notice -->
<div id="dedupInfo" class="hidden flex items-center gap-2 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-700 dark:text-amber-400 rounded-lg px-3 py-2 text-xs font-medium mb-3">
<i class="fa-solid fa-clone"></i>
<span id="dedupText"></span>
</div>
<div class="relative flex-grow flex flex-col">
<textarea id="bibOutput" class="w-full flex-grow bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-xl p-4 text-sm font-mono focus:ring-2 focus:ring-indigo-500 outline-none resize-none" placeholder="Your formatted BibTeX entries will accumulate here..." readonly></textarea>
<div id="loadingOverlay" class="absolute inset-0 bg-white/80 dark:bg-slate-950/80 backdrop-blur-sm rounded-xl flex flex-col items-center justify-center hidden">
<i class="fa-solid fa-circle-notch fa-spin text-4xl text-indigo-600 dark:text-indigo-500 mb-3"></i>
<span class="text-sm font-medium text-slate-600 dark:text-slate-400">Querying global registry...</span>
</div>
</div>
<div class="mt-4 grid grid-cols-4 gap-3">
<button id="copyBtn" class="bg-slate-100 dark:bg-slate-800 hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-200 py-2.5 rounded-lg font-medium transition-colors border border-slate-200 dark:border-slate-700 text-sm">
<i class="fa-regular fa-copy mr-1"></i> Copy
</button>
<button id="downloadBtn" class="bg-slate-100 dark:bg-slate-800 hover:bg-slate-200 dark:hover:bg-slate-700 text-slate-700 dark:text-slate-200 py-2.5 rounded-lg font-medium transition-colors border border-slate-200 dark:border-slate-700 text-sm">
<i class="fa-solid fa-download mr-1"></i> Save .bib
</button>
<button id="retryBtn" class="hidden bg-amber-50 dark:bg-amber-900/20 hover:bg-amber-100 dark:hover:bg-amber-900/40 text-amber-700 dark:text-amber-400 py-2.5 rounded-lg font-medium transition-colors border border-amber-200 dark:border-amber-800/50 text-sm">
<i class="fa-solid fa-rotate-right mr-1"></i> Retry
</button>
<button id="clearBtn" class="bg-red-50 dark:bg-red-900/20 hover:bg-red-100 dark:hover:bg-red-900/40 text-red-600 dark:text-red-400 py-2.5 rounded-lg font-medium transition-colors border border-red-200 dark:border-red-800/50 text-sm">
<i class="fa-solid fa-trash-can mr-1"></i> Clear
</button>
</div>
<!-- Error report -->
<div id="errorReport" class="hidden mt-4 border border-red-200 dark:border-red-800/50 rounded-xl overflow-hidden">
<div id="errorReportToggle" class="flex justify-between items-center px-4 py-2.5 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 text-xs font-semibold cursor-pointer select-none">
<span><i class="fa-solid fa-triangle-exclamation mr-1.5"></i><span id="errorReportTitle">0 failed</span></span>
<i class="fa-solid fa-chevron-down text-[10px] transition-transform duration-200" id="errorArrow"></i>
</div>
<div class="error-report-body text-slate-700 dark:text-slate-300" id="errorReportBody"></div>
</div>
<!-- Stats row -->
<div id="statsRow" class="hidden flex flex-wrap gap-4 pt-3 mt-4 border-t border-slate-100 dark:border-slate-800 text-xs text-slate-400">
<span>Fetched: <strong class="text-slate-700 dark:text-slate-200" id="statFetched">0</strong></span>
<span>Failed: <strong class="text-slate-700 dark:text-slate-200" id="statFailed">0</strong></span>
<span>Dupes removed: <strong class="text-slate-700 dark:text-slate-200" id="statDupes">0</strong></span>
<span>Time: <strong class="text-slate-700 dark:text-slate-200" id="statTime">0s</strong></span>
</div>
</div>
</div>
</div>
<section class="stk-section" id="how-to-use" aria-label="How to use this tool">
<div class="stk-wrap">
<span class="stk-chip"><i class="fa-solid fa-barcode"></i> How-To Guide</span>
<h2 class="stk-h2">How to turn DOIs into BibTeX</h2>
<p class="stk-lead">Paste one or many DOIs, pick how they're separated, and the tool resolves each one to a BibTeX entry and streams the results into a downloadable .bib file.</p>
<div class="stk-grid stk-grid-2"><div class="stk-step"><span class="stk-num">1</span><div><h3>Paste your DOIs</h3><p>One per line, or comma/semicolon/space separated. Bare DOIs and full doi.org URLs both work; duplicates are removed automatically.</p></div></div><div class="stk-step"><span class="stk-num">2</span><div><h3>Choose the delimiter</h3><p>Select how your DOIs are separated (or Auto) so they parse correctly.</p></div></div><div class="stk-step"><span class="stk-num">3</span><div><h3>Fetch</h3><p>Click <strong>Fetch</strong>. Entries stream in as they resolve, with a live progress bar and a retry option for any that fail.</p></div></div><div class="stk-step"><span class="stk-num">4</span><div><h3>Filter & export</h3><p>Toggle which BibTeX fields to keep, then <strong>Copy</strong> or <strong>Download</strong> your <code>references.bib</code>.</p></div></div></div>
</div>
</section>
<section class="stk-section" id="how-it-works" aria-label="How it works">
<div class="stk-wrap">
<h2 class="stk-h2">How resolution works</h2>
<div class="stk-grid stk-grid-2"><div class="stk-card"><h3 style="font-weight:700;margin-bottom:.4rem;">DOI content negotiation</h3><p style="font-size:.88rem;color:#64748b;line-height:1.6;">Each DOI is requested from <code>doi.org</code> with an <code>Accept: application/x-bibtex</code> header. The DOI system routes to the registering agency (Crossref, DataCite, mEDRA) and returns BibTeX, the same mechanism reference managers use.</p></div><div class="stk-card"><h3 style="font-weight:700;margin-bottom:.4rem;">Batching, dedup & retry</h3><p style="font-size:.88rem;color:#64748b;line-height:1.6;">DOIs are de-duplicated, fetched sequentially with a short delay to respect the service, and any failures are collected into a report you can retry in one click. Field filtering is applied locally to the returned entries.</p></div></div>
<div class="stk-note" style="margin-top:1rem;"><i class="fa-solid fa-circle-info" style="margin-top:.15rem;"></i><div>Privacy note: formatting and filtering happen in your browser, but resolving a DOI necessarily sends it to <code>doi.org</code> to retrieve the metadata, that network step is how DOI resolution works. No account or tracking is involved.</div></div>
</div>
</section>
<section class="stk-section" id="faq" aria-label="Frequently asked questions">
<div class="stk-wrap" style="max-width:52rem;">
<h2 class="stk-h2">Frequently asked questions</h2>
<div style="margin-top:1rem;"><details class="stk-faq"><summary>Does this use a private server?</summary><div>No STEMKit server is involved. Your browser contacts the public doi.org content-negotiation service directly to resolve each DOI.</div></details><details class="stk-faq"><summary>Which DOIs are supported?</summary><div>Any DOI whose registration agency exposes BibTeX via content negotiation, this covers the great majority of Crossref (journal/conference) and many DataCite (dataset) DOIs.</div></details><details class="stk-faq"><summary>Why did some DOIs fail?</summary><div>Common causes are a typo, a DOI whose agency doesn't return BibTeX, or a transient network error. Failed DOIs are listed and can be retried in one click.</div></details><details class="stk-faq"><summary>Can I remove fields like abstract or url?</summary><div>Yes. The field panel lets you keep only the BibTeX fields you want; filtering is applied to every entry locally.</div></details><details class="stk-faq"><summary>Are duplicates handled?</summary><div>Yes. Identical DOIs are detected and removed before fetching, and the count is reported.</div></details></div>
<div class="stk-refs"><a href="https://citation.doi.org/docs.html" target="_blank" rel="noopener"><i class="fa-solid fa-code"></i> DOI content negotiation</a><a href="https://www.crossref.org/documentation/retrieve-metadata/content-negotiation/" target="_blank" rel="noopener"><i class="fa-solid fa-book"></i> Crossref: content negotiation</a><a href="https://www.doi.org/" target="_blank" rel="noopener"><i class="fa-solid fa-link"></i> DOI system</a></div>
<p class="stk-credit">Formatting runs in your browser; DOIs are resolved via the public doi.org service.</p>
</div>
</section>
</main>
<div id="toastContainer" class="fixed bottom-6 right-6 z-50 flex flex-col gap-3"></div>
<!-- ════════ FOOTER (identical to original) ════════ -->
<footer class="mt-auto border-t border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-950 py-12">
<div class="max-w-7xl mx-auto px-6">
<div class="stk-dir mb-12">
<div>
<h4><i class="fa-solid fa-chart-pie text-indigo-500 text-xs"></i> Data & Stats</h4>
<ul>
<li><a href="plot-digitizer.html">Plot Digitizer</a></li>
<li><a href="data-cleaner.html">Data Cleaner</a></li>
<li><a href="stats-calculator.html">Stat Calculator</a></li>
<li><a href="error-bar-generator.html">Error Bar Gen</a></li>
<li><a href="outlier-detector.html">Outlier Detector</a></li>
<li><a href="curve-fitter.html">Curve Fitter</a></li>
<li><a href="plot-builder.html">Plot Builder</a></li>
<li><a href="xvg-visualizer.html">XVG Visualizer</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-microchip text-orange-500 text-xs"></i> Compute</h4>
<ul>
<li><a href="structure-inspector.html">3D Inspector</a></li>
<li><a href="coordinate-manipulator.html">Coordinate Manipulator</a></li>
<li><a href="scientific-converter.html">Energy Conversions</a></li>
<li><a href="script-generator.html">HPC Script Gen</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-book-open text-teal-500 text-xs"></i> Writing & Citations</h4>
<ul>
<li><a href="latex-formatter.html">Equation Formatter</a></li>
<li><a href="latex-tables.html">Visual LaTeX Tables</a></li>
<li><a href="doi-fetcher.html">DOI to BibTeX</a></li>
<li><a href="bibtex-deduplicator.html">BibTeX Deduplicator</a></li>
<li><a href="bibtex-sanitizer.html">BibTeX Sanitizer</a></li>
<li><a href="journal-abbreviator.html">Journal Abbrev</a></li>
</ul>
</div>
<div>
<h4><i class="fa-solid fa-headphones text-fuchsia-500 text-xs"></i> Focus & Flow</h4>
<ul>
<li><a href="pomodoro.html">Ambient Pomodoro</a></li>
<li><a href="decision.html">Decision Matrix</a></li>
<li><a href="sandbox.html">Kinetic Sandbox</a></li>
</ul>
</div>
</div>
<div class="border-t border-slate-200 dark:border-slate-800 pt-8 flex flex-col md:flex-row items-center justify-between text-slate-500 dark:text-slate-400 gap-4">
<div class="flex items-center gap-2">
<i class="fa-solid fa-flask text-xl text-slate-300 dark:text-slate-700"></i>
<span class="font-bold text-slate-700 dark:text-slate-300">STEMKit</span>
</div>
<div class="text-center text-sm font-medium">© 2026 STEMKit. Built by <a href="https://github.com/LD-Shell" target="_blank" rel="noopener" class="font-semibold hover:text-indigo-500 transition-colors">Olanrewaju M. Daramola</a>.</div>
<div class="flex gap-6 text-sm font-medium">
<a href="privacy.html#privacy" class="hover:text-indigo-500 transition-colors">Privacy Policy</a>
<a href="privacy.html#terms" class="hover:text-indigo-500 transition-colors">Terms of Service</a>
</div>
</div>
</div>
</footer>
<!-- ════════ SCRIPTS ════════ -->
<script>
// Theme toggle logic (Mobile & Desktop) | identical to original
document.querySelectorAll('.themeToggle').forEach(btn => {
btn.addEventListener('click', () => {
document.documentElement.classList.toggle('dark');
localStorage.theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light';
});
});
// Mobile menu logic | identical to original
const mobileMenuBtn = document.getElementById('mobile-menu-btn');
const mobileMenu = document.getElementById('mobile-menu');
const menuIcon = document.getElementById('menu-icon');
if(mobileMenuBtn) {
mobileMenuBtn.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
if(mobileMenu.classList.contains('hidden')) {
menuIcon.classList.remove('fa-xmark');
menuIcon.classList.add('fa-bars');
} else {
menuIcon.classList.remove('fa-bars');
menuIcon.classList.add('fa-xmark');
}
});
document.querySelectorAll('.mobile-link').forEach(link => {
link.addEventListener('click', () => {
mobileMenu.classList.add('hidden');
menuIcon.classList.remove('fa-xmark');
menuIcon.classList.add('fa-bars');
});
});
}
</script>
<script type="module" src="js/doi-fetcher.js"></script>
</body>
</html>