#!/usr/bin/env bun
/**
* Generate static HTML pages for License and Privacy from .txt files
* This ensures a single source of truth for legal documents
*/
import { readFileSync, writeFileSync } from 'fs';
import { join } from 'path';
const ROOT_DIR = join(import.meta.dir, '..');
const WEBPAGE_DIR = join(ROOT_DIR, 'webpage');
function escapeHtml(text: string): string {
return text
.replace(/&/g, '&')
.replace(//g, '>');
}
function generateHtmlPage(title: string, content: string): string {
return `