update
This commit is contained in:
@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gnupg \
|
gnupg \
|
||||||
|
poppler-utils \
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& npm install -g @anthropic-ai/claude-code opencode-ai \
|
&& npm install -g @anthropic-ai/claude-code opencode-ai \
|
||||||
|
|||||||
1
Makefile
1
Makefile
@@ -13,6 +13,7 @@ auth:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
pip install --break-system-packages fastapi uvicorn[standard] aiosqlite uv
|
pip install --break-system-packages fastapi uvicorn[standard] aiosqlite uv
|
||||||
|
@which pdftotext >/dev/null 2>&1 || sudo apt-get install -y poppler-utils
|
||||||
cd frontend && npm install
|
cd frontend && npm install
|
||||||
npm install -g opencode-ai
|
npm install -g opencode-ai
|
||||||
@mkdir -p $(HOME)/.config/opencode
|
@mkdir -p $(HOME)/.config/opencode
|
||||||
|
|||||||
@@ -305,11 +305,15 @@ def _pdfs_konvertieren(project: Path) -> None:
|
|||||||
|
|
||||||
Wird vor jeder Projekt-Generierung aufgerufen; konvertiert nur, wenn die
|
Wird vor jeder Projekt-Generierung aufgerufen; konvertiert nur, wenn die
|
||||||
.txt fehlt oder älter als das PDF ist. Das Original bleibt unangetastet.
|
.txt fehlt oder älter als das PDF ist. Das Original bleibt unangetastet.
|
||||||
|
Fehlt pdftotext und das Projekt enthält PDFs → harter Fehler statt
|
||||||
|
unzuverlässigem Direkt-Lese-Modus (MiniMax-Bilderlimit, Vision-Kosten).
|
||||||
"""
|
"""
|
||||||
if shutil.which("pdftotext") is None:
|
pdfs = list(project.rglob("*.pdf"))
|
||||||
_log(project.name, "pdftotext nicht installiert — PDFs bleiben unkonvertiert")
|
if not pdfs:
|
||||||
return
|
return
|
||||||
for pdf in project.rglob("*.pdf"):
|
if shutil.which("pdftotext") is None:
|
||||||
|
raise RuntimeError("pdftotext fehlt (poppler-utils installieren) — PDFs im Projekt können nicht gelesen werden")
|
||||||
|
for pdf in pdfs:
|
||||||
txt = pdf.with_suffix(".txt")
|
txt = pdf.with_suffix(".txt")
|
||||||
if txt.exists() and txt.stat().st_mtime >= pdf.stat().st_mtime:
|
if txt.exists() and txt.stat().st_mtime >= pdf.stat().st_mtime:
|
||||||
continue
|
continue
|
||||||
@@ -317,7 +321,7 @@ def _pdfs_konvertieren(project: Path) -> None:
|
|||||||
subprocess.run(["pdftotext", "-layout", str(pdf), str(txt)], check=True, timeout=120)
|
subprocess.run(["pdftotext", "-layout", str(pdf), str(txt)], check=True, timeout=120)
|
||||||
_log(project.name, f"PDF konvertiert: {pdf.name} → {txt.name}")
|
_log(project.name, f"PDF konvertiert: {pdf.name} → {txt.name}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_log(project.name, f"PDF-Konvertierung fehlgeschlagen ({pdf.name}): {e}")
|
raise RuntimeError(f"PDF-Konvertierung fehlgeschlagen ({pdf.name}): {e}") from e
|
||||||
|
|
||||||
|
|
||||||
def _build_recherche_prompt(topic: str, out_path: Path, instructions: str = "", project: Path | None = None) -> str:
|
def _build_recherche_prompt(topic: str, out_path: Path, instructions: str = "", project: Path | None = None) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user