from pathlib import Path

html_path = Path(__file__).parent / "pdf2html" / "index.html"
html = html_path.read_text(encoding="utf-8")
html = html.replace(
    '<html xmlns="http://www.w3.org/1999/xhtml">',
    '<html xmlns="http://www.w3.org/1999/xhtml" lang="en">',
    1,
)
html = html.replace(
    '<meta charset="utf-8"/>',
    '<meta charset="utf-8"/>\n'
    '<meta name="viewport" content="width=device-width, initial-scale=1"/>\n'
    '<meta name="description" content="Danziger Annuals and Perennials Catalog EU and ROW, converted from PDF to browser-native HTML."/>',
    1,
)
html = html.replace(
    "<title></title>",
    "<title>Danziger Annuals and Perennials Catalog</title>",
    1,
)
html_path.write_text(html, encoding="utf-8")
