← back to Ventura Corridor
iter 160: /issue.txt — plain-text dump of full issue (50KB, accessible/AI-ingestible)
4fc18b840c09042ab8f448155074ad9f7fe468ad · 2026-05-06 19:35:43 -0700 · SteveStudio2
Files touched
Diff
commit 4fc18b840c09042ab8f448155074ad9f7fe468ad
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 6 19:35:43 2026 -0700
iter 160: /issue.txt — plain-text dump of full issue (50KB, accessible/AI-ingestible)
---
src/server/index.ts | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/src/server/index.ts b/src/server/index.ts
index 1d3f470..4756dc0 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -78,6 +78,7 @@ const ADMIN_PATHS = [
/^\/issue(\/[\w-]+)?\/?$/i,
/^\/issue\.pdf\/?$/i,
/^\/issue\.epub\/?$/i,
+ /^\/issue\.txt\/?$/i,
/^\/search(\.html)?\/?$/i,
/^\/find(\.html)?\/?$/i,
/^\/api\/find\/?$/i,
@@ -2794,6 +2795,7 @@ article .biz small{display:block;font-family:monospace;font-size:9px;color:var(-
<a href="/magazine.html">⚙ Admin</a>
<a href="/issue.pdf${cat ? '?cat=' + encodeURIComponent(cat) : ''}" download>⬇ PDF</a>
<a href="/issue.epub${cat ? '?cat=' + encodeURIComponent(cat) : ''}" download>📖 EPUB</a>
+ <a href="/issue.txt${cat ? '?cat=' + encodeURIComponent(cat) : ''}" target="_blank">📄 .txt</a>
<a href="/issue/archive">🗂 Archive</a>
<a href="/quotes">" Quotes</a>
<a href="javascript:window.print()">🖨 Print</a>
@@ -3068,6 +3070,55 @@ app.get('/issue.pdf', async (req, res) => {
}
});
+// /issue.txt — plain-text dump of the entire issue (or by ?cat=).
+// Lossless content; readable in any terminal, screen reader, or AI ingest pipeline.
+app.get('/issue.txt', async (req, res) => {
+ try {
+ const cat = String(req.query.cat || '').trim() || null;
+ const where: string[] = [`mf.status = 'published'`, `length(mf.editorial) > 100`];
+ const params: any[] = [];
+ if (cat) { params.push(cat); where.push(`mf.category_tag = $${params.length}`); }
+ const r = await query(
+ `SELECT mf.id, mf.headline, mf.subhead, mf.editorial, mf.pull_quote, mf.category_tag,
+ mf.published_at, b.name AS biz_name, b.address AS biz_address, b.city
+ FROM magazine_features mf JOIN businesses b ON b.id = mf.business_id
+ WHERE ${where.join(' AND ')}
+ ORDER BY mf.published_at DESC NULLS LAST, mf.id DESC`,
+ params
+ );
+ const stamp = new Date().toISOString().slice(0, 10);
+ const lines: string[] = [];
+ lines.push('THE CORRIDOR');
+ lines.push(cat ? `· ${cat.toUpperCase()} ·` : '· VOLUME I ·');
+ lines.push(stamp);
+ lines.push('');
+ lines.push('A magazine of every business on Ventura Boulevard.');
+ lines.push('');
+ lines.push('=' .repeat(72));
+ for (const f of r.rows) {
+ lines.push('');
+ lines.push((f.headline || f.biz_name || '').toUpperCase());
+ if (f.subhead) lines.push(f.subhead);
+ lines.push('');
+ lines.push(f.editorial || '');
+ if (f.pull_quote) {
+ lines.push('');
+ lines.push(` "${f.pull_quote}"`);
+ }
+ lines.push('');
+ lines.push(`— ${f.biz_name}${f.biz_address ? ' · ' + f.biz_address : ''}${f.city ? ' · ' + f.city : ''}`);
+ lines.push(`— /magazine/${f.id} · ${f.category_tag || 'feature'}`);
+ lines.push('');
+ lines.push('-' .repeat(48));
+ }
+ lines.push('');
+ lines.push(`${r.rowCount} features · The Corridor · the-corridor`);
+ res.type('text/plain').send(lines.join('\n'));
+ } catch (e: any) {
+ res.status(500).type('text/plain').send('error: ' + e.message);
+ }
+});
+
// /issue.epub — EPUB 2 export of all published features (or by category).
// Pure zip; no Playwright. Readable in Apple Books, Calibre, Kindle (after conversion).
app.get('/issue.epub', async (req, res) => {
← 4b6a73d iter 159: /api/magazine/gen-queue + 'Up next' rail on today.
·
back to Ventura Corridor
·
iter 161: /health.html — pipeline-wide one-page status w/ pi b39e8cf →