katalog_web.py: statische Katalog-Site (index/sendungen/themen/namen.html) aus den Listen generieren; Hook als Schritt 8 in neue_sendungen.py; generierte Site web/ committed
This commit is contained in:
315
katalog_web.py
Normal file
315
katalog_web.py
Normal file
@ -0,0 +1,315 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
katalog_web.py - statische Webseiten aus den Katalogdateien erzeugen
|
||||||
|
|
||||||
|
Liest aus dem Archiv-Verzeichnis (src):
|
||||||
|
Sendungsliste.txt, Themenkatalog.txt, Namensverzeichnis.txt, abstracts.txt
|
||||||
|
und schreibt ein statisches Site nach (out, Default: <src>/web):
|
||||||
|
index.html, sendungen.html, themen.html, namen.html
|
||||||
|
|
||||||
|
Aufruf:
|
||||||
|
python3 katalog_web.py # src = Skript-Ordner, out = src/web
|
||||||
|
python3 katalog_web.py --src DIR --out DIR2 # freie Wahl
|
||||||
|
|
||||||
|
Kein Build, keine externen Assets - die HTML-Dateien funktionieren offline
|
||||||
|
und auf jedem beliebigen Static-Host (Webroot, Gitea Pages, tailscale serve).
|
||||||
|
Suche/Filter laufen clientseitig per JavaScript (?q=... in der URL geht auch).
|
||||||
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import datetime
|
||||||
|
import html
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import unicodedata
|
||||||
|
|
||||||
|
|
||||||
|
def esc(s):
|
||||||
|
return html.escape(s or "", quote=True)
|
||||||
|
|
||||||
|
|
||||||
|
def sortkey(name):
|
||||||
|
return unicodedata.normalize("NFKD", name).encode("ascii", "ignore").decode().lower()
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- Parser ----------
|
||||||
|
|
||||||
|
def parse_sendungsliste(path):
|
||||||
|
"""-> Liste von dicts {nr, datum, titel, ordner}, nach Nummer sortiert."""
|
||||||
|
rows = []
|
||||||
|
if not os.path.exists(path):
|
||||||
|
return rows
|
||||||
|
with open(path, encoding="utf-8") as fh:
|
||||||
|
for line in fh:
|
||||||
|
parts = line.rstrip("\n").split("\t")
|
||||||
|
if len(parts) >= 3 and re.match(r"^\d{3}$", parts[0]):
|
||||||
|
rows.append({"nr": parts[0], "datum": parts[1],
|
||||||
|
"titel": parts[2],
|
||||||
|
"ordner": parts[3] if len(parts) > 3 else ""})
|
||||||
|
rows.sort(key=lambda r: int(r["nr"]))
|
||||||
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
def parse_themenkatalog(path):
|
||||||
|
"""-> (header_lines, [(rubrik, [(nr, titel), ...]), ...]) in Dateireihenfolge."""
|
||||||
|
if not os.path.exists(path):
|
||||||
|
return [], []
|
||||||
|
lines = open(path, encoding="utf-8").read().split("\n")
|
||||||
|
header, sections = [], []
|
||||||
|
rubrik = None
|
||||||
|
eintraege = None
|
||||||
|
i = 0
|
||||||
|
# Header: alles bis zur ersten Rubrik-Zeile
|
||||||
|
while i < len(lines):
|
||||||
|
if re.match(r"^.+ \(\d+ (Sendungen|Dateien)", lines[i]) and i + 1 < len(lines) \
|
||||||
|
and re.match(r"^-+\s*$", lines[i + 1]):
|
||||||
|
break
|
||||||
|
header.append(lines[i])
|
||||||
|
i += 1
|
||||||
|
while i < len(lines):
|
||||||
|
line = lines[i]
|
||||||
|
if re.match(r"^.+ \(\d+ (Sendungen|Dateien)", line) and i + 1 < len(lines) \
|
||||||
|
and re.match(r"^-+\s*$", lines[i + 1]):
|
||||||
|
rubrik = line
|
||||||
|
eintraege = []
|
||||||
|
sections.append((rubrik, eintraege))
|
||||||
|
i += 2
|
||||||
|
continue
|
||||||
|
m = re.match(r"^(\d{3}) - (.*)$", line)
|
||||||
|
if m and eintraege is not None:
|
||||||
|
eintraege.append((m.group(1), m.group(2)))
|
||||||
|
elif line.strip() and eintraege is not None and not line.startswith("-"):
|
||||||
|
eintraege.append(("", line.strip())) # Fließtext innerhalb einer Rubrik
|
||||||
|
i += 1
|
||||||
|
return header, sections
|
||||||
|
|
||||||
|
|
||||||
|
def parse_namensverzeichnis(path):
|
||||||
|
"""-> [(name, [nr, ...])] alphabetisch sortiert."""
|
||||||
|
persons = {}
|
||||||
|
if os.path.exists(path):
|
||||||
|
for line in open(path, encoding="utf-8"):
|
||||||
|
m = re.match(r"^([^\t]+)\t(.+)$", line.rstrip("\n"))
|
||||||
|
if m and not m.group(1).startswith("Nachname"):
|
||||||
|
persons[m.group(1)] = re.findall(r"\d{3}", m.group(2))
|
||||||
|
return [(name, persons[name]) for name in sorted(persons, key=sortkey)]
|
||||||
|
|
||||||
|
|
||||||
|
def parse_abstracts(path):
|
||||||
|
"""-> dict nr -> (titel, abstract_text)."""
|
||||||
|
result = {}
|
||||||
|
if not os.path.exists(path):
|
||||||
|
return result
|
||||||
|
nr = None
|
||||||
|
titel = ""
|
||||||
|
text = []
|
||||||
|
for line in open(path, encoding="utf-8").read().split("\n"):
|
||||||
|
m = re.match(r"^(\d{3}) \| (.*)$", line)
|
||||||
|
if m:
|
||||||
|
if nr:
|
||||||
|
result[nr] = (titel, "\n".join(text))
|
||||||
|
nr, titel, text = m.group(1), m.group(2), []
|
||||||
|
elif nr and line.startswith(" "):
|
||||||
|
text.append(line[4:])
|
||||||
|
if nr:
|
||||||
|
result[nr] = (titel, "\n".join(text))
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- HTML ----------
|
||||||
|
|
||||||
|
CSS = """
|
||||||
|
:root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --line:#e2e2e2; --accent:#7a1f2b;
|
||||||
|
--card:#f7f5f2; --hl:#fdf3d8; }
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root { --bg:#161618; --fg:#e8e6e3; --muted:#9a9a9a; --line:#333;
|
||||||
|
--accent:#e08a96; --card:#1f1f22; --hl:#3a3416; } }
|
||||||
|
* { box-sizing:border-box; }
|
||||||
|
body { margin:0; background:var(--bg); color:var(--fg);
|
||||||
|
font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
|
||||||
|
header { position:sticky; top:0; background:var(--bg); border-bottom:1px solid var(--line);
|
||||||
|
padding:.6rem 1rem; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; z-index:5; }
|
||||||
|
header .brand { font-weight:700; color:var(--accent); text-decoration:none; margin-right:auto; }
|
||||||
|
header input[type=search] { flex:1 1 16rem; padding:.45rem .7rem; font-size:1rem;
|
||||||
|
border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); }
|
||||||
|
header select { padding:.45rem .4rem; border:1px solid var(--line); border-radius:6px;
|
||||||
|
background:var(--bg); color:var(--fg); }
|
||||||
|
nav a { color:var(--fg); text-decoration:none; padding:.3rem .55rem; border-radius:6px; }
|
||||||
|
nav a:hover, nav a.active { background:var(--card); }
|
||||||
|
main { max-width:1100px; margin:0 auto; padding:1rem; }
|
||||||
|
h1 { font-size:1.4rem; } h2 { font-size:1.15rem; margin-top:1.6rem;
|
||||||
|
border-bottom:2px solid var(--accent); padding-bottom:.2rem; }
|
||||||
|
table { border-collapse:collapse; width:100%; }
|
||||||
|
th, td { text-align:left; padding:.35rem .5rem; border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top; }
|
||||||
|
th { position:sticky; top:3.2rem; background:var(--bg); }
|
||||||
|
tr:hover td { background:var(--card); }
|
||||||
|
tr:target td { background:var(--hl); }
|
||||||
|
.nr { font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--muted); }
|
||||||
|
.ordner { color:var(--muted); font-size:.85rem; white-space:nowrap; }
|
||||||
|
details { margin:.15rem 0; } summary { cursor:pointer; color:var(--muted); font-size:.9rem; }
|
||||||
|
details p { margin:.3rem 0 .3rem 1rem; color:var(--fg); white-space:pre-line; }
|
||||||
|
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1.5rem; }
|
||||||
|
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem;
|
||||||
|
text-decoration:none; color:var(--fg); }
|
||||||
|
.card:hover { border-color:var(--accent); }
|
||||||
|
.card h2 { border:none; margin:0 0 .3rem; padding:0; }
|
||||||
|
.card .count { color:var(--muted); font-size:.9rem; }
|
||||||
|
ul.list { list-style:none; padding:0; }
|
||||||
|
ul.list li { padding:.3rem .5rem; border-bottom:1px solid var(--line); }
|
||||||
|
a { color:var(--accent); }
|
||||||
|
footer { max-width:1100px; margin:2rem auto; padding:1rem; color:var(--muted); font-size:.85rem;
|
||||||
|
border-top:1px solid var(--line); }
|
||||||
|
.tag { display:inline-block; background:var(--card); border:1px solid var(--line);
|
||||||
|
border-radius:5px; padding:0 .35rem; font-size:.8rem; color:var(--muted); text-decoration:none; }
|
||||||
|
"""
|
||||||
|
|
||||||
|
JS = """
|
||||||
|
function filter() {
|
||||||
|
const q = document.getElementById('q').value.toLowerCase();
|
||||||
|
const ord = document.getElementById('ordner');
|
||||||
|
const ordv = ord ? ord.value : '';
|
||||||
|
document.querySelectorAll('[data-row]').forEach(el => {
|
||||||
|
const okq = !q || el.textContent.toLowerCase().includes(q);
|
||||||
|
const oko = !ordv || (el.getAttribute('data-ordner') || '') === ordv;
|
||||||
|
el.style.display = (okq && oko) ? '' : 'none';
|
||||||
|
});
|
||||||
|
const n = document.querySelectorAll('[data-row]:not([style*="none"])').length;
|
||||||
|
const c = document.getElementById('count');
|
||||||
|
if (c) c.textContent = n + ' Einträge';
|
||||||
|
}
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const p = new URLSearchParams(location.search).get('q');
|
||||||
|
if (p) { document.getElementById('q').value = p; }
|
||||||
|
filter();
|
||||||
|
});
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def page(title, body, active, extra_nav=""):
|
||||||
|
nav = (f'<a href="index.html"{" class=active" if active=="index" else ""}>Start</a>'
|
||||||
|
f'<a href="sendungen.html"{" class=active" if active=="sendungen" else ""}>Sendungen</a>'
|
||||||
|
f'<a href="themen.html"{" class=active" if active=="themen" else ""}>Themen</a>'
|
||||||
|
f'<a href="namen.html"{" class=active" if active=="namen" else ""}>Personen</a>'
|
||||||
|
+ extra_nav)
|
||||||
|
return f"""<!DOCTYPE html>
|
||||||
|
<html lang="de"><head><meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<title>{esc(title)} · Lange-Nacht-Archiv</title>
|
||||||
|
<style>{CSS}</style></head><body>
|
||||||
|
<header><a class="brand" href="index.html">Lange-Nacht-Archiv</a>
|
||||||
|
<nav>{nav}</nav>
|
||||||
|
<input id="q" type="search" placeholder="Suchen …" oninput="filter()">
|
||||||
|
<span id="count" class="ordner"></span></header>
|
||||||
|
<main>{body}</main>
|
||||||
|
<footer>Generiert am {datetime.date.today().strftime('%d.%m.%Y')} aus Sendungsliste.txt,
|
||||||
|
Themenkatalog.txt, Namensverzeichnis.txt und abstracts.txt · katalog_web.py</footer>
|
||||||
|
<script>{JS}</script></body></html>"""
|
||||||
|
|
||||||
|
|
||||||
|
def build_index(out, rows, sections, persons):
|
||||||
|
n_send = len(rows)
|
||||||
|
n_themen = sum(len(e) for _r, e in sections)
|
||||||
|
n_mit_abs = len(parse_abstracts(os.path.join(out_src, "abstracts.txt")))
|
||||||
|
body = f"""
|
||||||
|
<h1>Lange Nacht — Aufnahme-Archiv</h1>
|
||||||
|
<p>Stöbern in {n_send} aufgenommenen „Lange Nacht“-Sendungen (Deutschlandfunk /
|
||||||
|
Deutschlandfunk Kultur): nach <a href="sendungen.html">Nummer</a>,
|
||||||
|
<a href="themen.html">Thema</a> oder <a href="namen.html">Person</a>.</p>
|
||||||
|
<div class="cards">
|
||||||
|
<a class="card" href="sendungen.html"><h2>Sendungsliste</h2>
|
||||||
|
<span class="count">{n_send} Sendungen, {n_mit_abs} mit Abstract</span></a>
|
||||||
|
<a class="card" href="themen.html"><h2>Themenkatalog</h2>
|
||||||
|
<span class="count">{len(sections)} Rubriken, {n_themen} Einträge</span></a>
|
||||||
|
<a class="card" href="namen.html"><h2>Namensverzeichnis</h2>
|
||||||
|
<span class="count">{len(persons)} Personen</span></a>
|
||||||
|
</div>"""
|
||||||
|
return page("Start", body, "index")
|
||||||
|
|
||||||
|
|
||||||
|
def build_sendungen(out, rows, abstracts):
|
||||||
|
trs = []
|
||||||
|
for r in rows:
|
||||||
|
nr = r["nr"]
|
||||||
|
abs_titel, abs_text = abstracts.get(nr, ("", ""))
|
||||||
|
det = ""
|
||||||
|
if abs_text:
|
||||||
|
det = (f'<details><summary>Abstract</summary><p>{esc(abs_text)}</p></details>')
|
||||||
|
trs.append(
|
||||||
|
f'<tr data-row data-ordner="{esc(r["ordner"])}" id="s{nr}">'
|
||||||
|
f'<td class="nr">{nr}</td><td class="nr">{esc(r["datum"])}</td>'
|
||||||
|
f'<td>{esc(r["titel"])}{det}</td>'
|
||||||
|
f'<td class="ordner">{esc(r["ordner"])}</td></tr>')
|
||||||
|
body = f"""
|
||||||
|
<h1>Sendungsliste</h1>
|
||||||
|
<table><thead><tr><th>Nr</th><th>Datum</th><th>Titel</th><th>Ordner</th></tr></thead>
|
||||||
|
<tbody>{''.join(trs)}</tbody></table>"""
|
||||||
|
p = page("Sendungen", body, "sendungen")
|
||||||
|
# Ordner-Filter einbauen
|
||||||
|
ordner = sorted({r["ordner"] for r in rows if r["ordner"]})
|
||||||
|
if ordner:
|
||||||
|
sel = ('<select id="ordner" onchange="filter()"><option value="">alle Ordner</option>'
|
||||||
|
+ "".join(f'<option value="{esc(o)}">{esc(o)}</option>' for o in ordner)
|
||||||
|
+ "</select>")
|
||||||
|
p = p.replace('<input id="q"', sel + '<input id="q"', 1)
|
||||||
|
return p
|
||||||
|
|
||||||
|
|
||||||
|
def build_themen(out, sections):
|
||||||
|
parts = []
|
||||||
|
for rubrik, eintraege in sections:
|
||||||
|
if rubrik.startswith("Anmerkungen"):
|
||||||
|
continue
|
||||||
|
items = []
|
||||||
|
for nr, titel in eintraege:
|
||||||
|
if nr:
|
||||||
|
items.append(f'<li data-row><a href="sendungen.html#s{nr}">{nr}</a> – {esc(titel)}</li>')
|
||||||
|
else:
|
||||||
|
items.append(f'<li data-row>{esc(titel)}</li>')
|
||||||
|
parts.append(f"<h2>{esc(rubrik)}</h2><ul class='list'>{''.join(items)}</ul>")
|
||||||
|
body = f"<h1>Themenkatalog</h1>{''.join(parts)}"
|
||||||
|
return page("Themenkatalog", body, "themen")
|
||||||
|
|
||||||
|
|
||||||
|
def build_namen(out, persons):
|
||||||
|
items = []
|
||||||
|
for name, nrs in persons:
|
||||||
|
links = " ".join(f'<a class="tag" href="sendungen.html#s{n}">{n}</a>' for n in nrs)
|
||||||
|
items.append(f'<li data-row><strong>{esc(name)}</strong> {links}</li>')
|
||||||
|
body = f"<h1>Namensverzeichnis</h1><ul class='list'>{''.join(items)}</ul>"
|
||||||
|
return page("Namensverzeichnis", body, "namen")
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- main ----------
|
||||||
|
|
||||||
|
out_src = "."
|
||||||
|
|
||||||
|
|
||||||
|
def main(src=None, out=None):
|
||||||
|
global out_src
|
||||||
|
src = src or os.path.dirname(os.path.abspath(__file__))
|
||||||
|
out = out or os.path.join(src, "web")
|
||||||
|
out_src = src
|
||||||
|
os.makedirs(out, exist_ok=True)
|
||||||
|
rows = parse_sendungsliste(os.path.join(src, "Sendungsliste.txt"))
|
||||||
|
header, sections = parse_themenkatalog(os.path.join(src, "Themenkatalog.txt"))
|
||||||
|
persons = parse_namensverzeichnis(os.path.join(src, "Namensverzeichnis.txt"))
|
||||||
|
abstracts = parse_abstracts(os.path.join(src, "abstracts.txt"))
|
||||||
|
with open(os.path.join(out, "index.html"), "w", encoding="utf-8") as fh:
|
||||||
|
fh.write(build_index(out, rows, sections, persons))
|
||||||
|
with open(os.path.join(out, "sendungen.html"), "w", encoding="utf-8") as fh:
|
||||||
|
fh.write(build_sendungen(out, rows, abstracts))
|
||||||
|
with open(os.path.join(out, "themen.html"), "w", encoding="utf-8") as fh:
|
||||||
|
fh.write(build_themen(out, sections))
|
||||||
|
with open(os.path.join(out, "namen.html"), "w", encoding="utf-8") as fh:
|
||||||
|
fh.write(build_namen(out, persons))
|
||||||
|
print(f"Web-Katalog geschrieben nach {out}: "
|
||||||
|
f"{len(rows)} Sendungen, {len(sections)} Rubriken, {len(persons)} Personen.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
ap = argparse.ArgumentParser()
|
||||||
|
ap.add_argument("--src", default=None)
|
||||||
|
ap.add_argument("--out", default=None)
|
||||||
|
args = ap.parse_args()
|
||||||
|
main(args.src, args.out)
|
||||||
@ -21,6 +21,7 @@ Ablauf fuer jede neue Audiodatei (ohne Nummern-Praefix) im Script-Ordner:
|
|||||||
nachtragen; fehlende Abstracts datierter Aufnahmen werden mitgefuehrt
|
nachtragen; fehlende Abstracts datierter Aufnahmen werden mitgefuehrt
|
||||||
7. Namensverzeichnis.txt + namensverzeichnis.csv: Personen aus Titel und
|
7. Namensverzeichnis.txt + namensverzeichnis.csv: Personen aus Titel und
|
||||||
Abstract der neuen Sendungen nachtragen
|
Abstract der neuen Sendungen nachtragen
|
||||||
|
8. web/ (statische Katalog-Seiten) via katalog_web.py neu erzeugen
|
||||||
|
|
||||||
Benötigt nur Python 3 (Standardbibliothek) und Internet fuer die Titelsuche.
|
Benötigt nur Python 3 (Standardbibliothek) und Internet fuer die Titelsuche.
|
||||||
"""
|
"""
|
||||||
@ -593,6 +594,13 @@ def main():
|
|||||||
# 7. Namensliste aktualisieren (Namensverzeichnis.txt + namensverzeichnis.csv)
|
# 7. Namensliste aktualisieren (Namensverzeichnis.txt + namensverzeichnis.csv)
|
||||||
namensliste_aktualisieren(ergebnisse)
|
namensliste_aktualisieren(ergebnisse)
|
||||||
|
|
||||||
|
# 8. Statische Webseiten (web/) neu erzeugen, falls katalog_web.py vorhanden
|
||||||
|
try:
|
||||||
|
import katalog_web
|
||||||
|
katalog_web.main(DIR, os.path.join(DIR, "web"))
|
||||||
|
except Exception as e:
|
||||||
|
print(f"web/ nicht aktualisiert: {e}")
|
||||||
|
|
||||||
print(f"\nFertig. {len(ergebnisse)} Aufnahme(n) nummeriert "
|
print(f"\nFertig. {len(ergebnisse)} Aufnahme(n) nummeriert "
|
||||||
f"(Nr. {ergebnisse[0][0]:03d}-{ergebnisse[-1][0]:03d}).")
|
f"(Nr. {ergebnisse[0][0]:03d}-{ergebnisse[-1][0]:03d}).")
|
||||||
|
|
||||||
|
|||||||
88
web/index.html
Normal file
88
web/index.html
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de"><head><meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<title>Start · Lange-Nacht-Archiv</title>
|
||||||
|
<style>
|
||||||
|
:root { --bg:#fff; --fg:#1a1a1a; --muted:#666; --line:#e2e2e2; --accent:#7a1f2b;
|
||||||
|
--card:#f7f5f2; --hl:#fdf3d8; }
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root { --bg:#161618; --fg:#e8e6e3; --muted:#9a9a9a; --line:#333;
|
||||||
|
--accent:#e08a96; --card:#1f1f22; --hl:#3a3416; } }
|
||||||
|
* { box-sizing:border-box; }
|
||||||
|
body { margin:0; background:var(--bg); color:var(--fg);
|
||||||
|
font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
|
||||||
|
header { position:sticky; top:0; background:var(--bg); border-bottom:1px solid var(--line);
|
||||||
|
padding:.6rem 1rem; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; z-index:5; }
|
||||||
|
header .brand { font-weight:700; color:var(--accent); text-decoration:none; margin-right:auto; }
|
||||||
|
header input[type=search] { flex:1 1 16rem; padding:.45rem .7rem; font-size:1rem;
|
||||||
|
border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); }
|
||||||
|
header select { padding:.45rem .4rem; border:1px solid var(--line); border-radius:6px;
|
||||||
|
background:var(--bg); color:var(--fg); }
|
||||||
|
nav a { color:var(--fg); text-decoration:none; padding:.3rem .55rem; border-radius:6px; }
|
||||||
|
nav a:hover, nav a.active { background:var(--card); }
|
||||||
|
main { max-width:1100px; margin:0 auto; padding:1rem; }
|
||||||
|
h1 { font-size:1.4rem; } h2 { font-size:1.15rem; margin-top:1.6rem;
|
||||||
|
border-bottom:2px solid var(--accent); padding-bottom:.2rem; }
|
||||||
|
table { border-collapse:collapse; width:100%; }
|
||||||
|
th, td { text-align:left; padding:.35rem .5rem; border-bottom:1px solid var(--line);
|
||||||
|
vertical-align:top; }
|
||||||
|
th { position:sticky; top:3.2rem; background:var(--bg); }
|
||||||
|
tr:hover td { background:var(--card); }
|
||||||
|
tr:target td { background:var(--hl); }
|
||||||
|
.nr { font-variant-numeric:tabular-nums; white-space:nowrap; color:var(--muted); }
|
||||||
|
.ordner { color:var(--muted); font-size:.85rem; white-space:nowrap; }
|
||||||
|
details { margin:.15rem 0; } summary { cursor:pointer; color:var(--muted); font-size:.9rem; }
|
||||||
|
details p { margin:.3rem 0 .3rem 1rem; color:var(--fg); white-space:pre-line; }
|
||||||
|
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; margin-top:1.5rem; }
|
||||||
|
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem;
|
||||||
|
text-decoration:none; color:var(--fg); }
|
||||||
|
.card:hover { border-color:var(--accent); }
|
||||||
|
.card h2 { border:none; margin:0 0 .3rem; padding:0; }
|
||||||
|
.card .count { color:var(--muted); font-size:.9rem; }
|
||||||
|
ul.list { list-style:none; padding:0; }
|
||||||
|
ul.list li { padding:.3rem .5rem; border-bottom:1px solid var(--line); }
|
||||||
|
a { color:var(--accent); }
|
||||||
|
footer { max-width:1100px; margin:2rem auto; padding:1rem; color:var(--muted); font-size:.85rem;
|
||||||
|
border-top:1px solid var(--line); }
|
||||||
|
.tag { display:inline-block; background:var(--card); border:1px solid var(--line);
|
||||||
|
border-radius:5px; padding:0 .35rem; font-size:.8rem; color:var(--muted); text-decoration:none; }
|
||||||
|
</style></head><body>
|
||||||
|
<header><a class="brand" href="index.html">Lange-Nacht-Archiv</a>
|
||||||
|
<nav><a href="index.html" class=active>Start</a><a href="sendungen.html">Sendungen</a><a href="themen.html">Themen</a><a href="namen.html">Personen</a></nav>
|
||||||
|
<input id="q" type="search" placeholder="Suchen …" oninput="filter()">
|
||||||
|
<span id="count" class="ordner"></span></header>
|
||||||
|
<main>
|
||||||
|
<h1>Lange Nacht — Aufnahme-Archiv</h1>
|
||||||
|
<p>Stöbern in 719 aufgenommenen „Lange Nacht“-Sendungen (Deutschlandfunk /
|
||||||
|
Deutschlandfunk Kultur): nach <a href="sendungen.html">Nummer</a>,
|
||||||
|
<a href="themen.html">Thema</a> oder <a href="namen.html">Person</a>.</p>
|
||||||
|
<div class="cards">
|
||||||
|
<a class="card" href="sendungen.html"><h2>Sendungsliste</h2>
|
||||||
|
<span class="count">719 Sendungen, 716 mit Abstract</span></a>
|
||||||
|
<a class="card" href="themen.html"><h2>Themenkatalog</h2>
|
||||||
|
<span class="count">13 Rubriken, 668 Einträge</span></a>
|
||||||
|
<a class="card" href="namen.html"><h2>Namensverzeichnis</h2>
|
||||||
|
<span class="count">204 Personen</span></a>
|
||||||
|
</div></main>
|
||||||
|
<footer>Generiert am 19.11.2026 aus Sendungsliste.txt,
|
||||||
|
Themenkatalog.txt, Namensverzeichnis.txt und abstracts.txt · katalog_web.py</footer>
|
||||||
|
<script>
|
||||||
|
function filter() {
|
||||||
|
const q = document.getElementById('q').value.toLowerCase();
|
||||||
|
const ord = document.getElementById('ordner');
|
||||||
|
const ordv = ord ? ord.value : '';
|
||||||
|
document.querySelectorAll('[data-row]').forEach(el => {
|
||||||
|
const okq = !q || el.textContent.toLowerCase().includes(q);
|
||||||
|
const oko = !ordv || (el.getAttribute('data-ordner') || '') === ordv;
|
||||||
|
el.style.display = (okq && oko) ? '' : 'none';
|
||||||
|
});
|
||||||
|
const n = document.querySelectorAll('[data-row]:not([style*="none"])').length;
|
||||||
|
const c = document.getElementById('count');
|
||||||
|
if (c) c.textContent = n + ' Einträge';
|
||||||
|
}
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const p = new URLSearchParams(location.search).get('q');
|
||||||
|
if (p) { document.getElementById('q').value = p; }
|
||||||
|
filter();
|
||||||
|
});
|
||||||
|
</script></body></html>
|
||||||
76
web/namen.html
Normal file
76
web/namen.html
Normal file
File diff suppressed because one or more lines are too long
79
web/sendungen.html
Normal file
79
web/sendungen.html
Normal file
File diff suppressed because one or more lines are too long
76
web/themen.html
Normal file
76
web/themen.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user