Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 861 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 861 Bytes

doc_generator

Batch-generate Word documents and PDFs from Excel data using .docx templates.

Setup

pip install -r requirements.txt

Place input_data.xlsx in the project root and templates in templates/ (e.g. template_4.docx, template_6.docx, …).

Requires LibreOffice for PDF export.

Run

python edit_template.py

Reads the first 100 rows from input_data.xlsx, picks a template by Типоразмер (column AB), fills {{ tag }} placeholders, and writes PDFs to pdf_results/.

Project layout

edit_template.py      # main script
requirements.txt
templates/            # one .docx template per Типоразмер value
input_data.xlsx       # local data file (not committed)
generated/            # intermediate .docx files
pdf_results/          # output PDFs