any-file to PDF (Phase 1): converters/ dispatcher, images/text/md/csv/json/xml/svg/pdf-passthrough, 112 tests green

This commit is contained in:
sirdave73
2026-09-02 01:53:24 -04:00
parent 0b575a3e1f
commit 345c39417b
17 changed files with 1306 additions and 17 deletions
+7 -6
View File
@@ -118,12 +118,12 @@
<body>
<header class="masthead">
<div class="wordmark"><span class="fleuron">&#10086;</span>Bindery</div>
<p class="tagline">A local typesetter. Drop an EPUB, take a properly set PDF. Nothing leaves your machine.</p>
<p class="tagline">A local typesetter. Drop a document, take a properly set PDF. Nothing leaves your machine.</p>
</header>
<div class="rule"></div>
<main>
<section id="drop" class="drop" role="button" tabindex="0" aria-label="Upload an EPUB file">
<section id="drop" class="drop" role="button" tabindex="0" aria-label="Upload a document">
<div class="shelf" aria-hidden="true">
<span class="spine" style="--c:#6e3b34;--h:150px;--w:24px"></span>
<span class="spine" style="--c:#33513f;--h:164px;--w:20px"></span>
@@ -135,11 +135,11 @@
<span class="spine" style="--c:#46525e;--h:156px;--w:26px"></span>
</div>
<div class="drop-copy">
<h1>Drop a book to set it in type</h1>
<p>or <span class="browse">browse your files</span> &middot; up to <span id="maxmb">400</span>&nbsp;MB &middot; <code>.epub</code></p>
<h1>Drop a file to set it in type</h1>
<p>or <span class="browse">browse your files</span> &middot; up to <span id="maxmb">400</span>&nbsp;MB &middot; <code>.epub .html .md .txt .csv .json .xml .svg .png .jpg .webp &hellip;</code></p>
</div>
<p id="droperr" class="drop-err" role="alert"></p>
<input type="file" id="file" accept=".epub">
<input type="file" id="file" accept=".epub,.html,.htm,.txt,.log,.md,.markdown,.csv,.tsv,.json,.xml,.svg,.png,.jpg,.jpeg,.webp">
</section>
<section id="status" class="status" hidden>
@@ -237,7 +237,8 @@
}
function start(f) {
if (!/\.epub$/i.test(f.name)) { flashError('That is not an .epub — pick a book with the .epub extension.'); return; }
var OKEXT = /\.(epub|html?|txt|log|md|markdown|csv|tsv|json|xml|svg|png|jpe?g|webp)$/i;
if (!OKEXT.test(f.name)) { flashError('Unsupported file type — accepted: .epub .html .md .txt .log .csv .tsv .json .xml .svg .png .jpg .webp'); return; }
var form = new FormData();
form.append('file', f);
showStatus();