Add PDF-based document generation with LibreOffice; fix line numbering and margins
Mirror and run GitLab CI / build (push) Has been cancelled
Ruff / ruff (push) Has been cancelled

- Add LibreOffice Writer and DejaVu fonts to Dockerfile for PDF generation
- Add PyPDF2 and reportlab to requirements.txt
- Refactor email_sender.py:
  - Enforce 1-inch margins on all sides
  - Isolate line numbering to transcript section only
  - Add generate_pdf_documents() to build:
    - TRANSCRIPT.pdf (cover + transcript)
    - SUMMARY.pdf (cover + summary)
    - COMBINED.pdf (transcript cover + summary + TRANSCRIPT header + transcript)
  - Add page numbers (bottom-right) to all PDFs via reportlab
- Update tasks.py:
  - Use generate_pdf_documents() after creating DOCX files
  - Attach source JSON, MD files, and compiled PDFs in success email
- Add test_docx_generation.py for transcript/summary/combined DOCX testing
This commit is contained in:
admin
2026-06-15 02:19:17 +00:00
parent b0a23b32e1
commit 42a155aeaa
5 changed files with 534 additions and 119 deletions
+7 -2
View File
@@ -9,9 +9,14 @@ LABEL description="Scraibe: LocalAI-backed transcription and diarization client
Sends audio to a LocalAI server running vibevoice.cpp and uses a second LLM for summarization."
LABEL url="https://git.optimex.systems/admin/scribe"
# Install system dependencies (ffmpeg, redis)
# Install system dependencies (ffmpeg, redis, LibreOffice for PDF generation)
RUN apt update -y && \
apt install -y --no-install-recommends ffmpeg redis-server && \
apt install -y --no-install-recommends \
ffmpeg \
redis-server \
libreoffice-writer \
fonts-dejavu-core \
&& \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*