Photometric datasheet generator (HTML + PDF) from EULUMDAT .ldt files
Project description
eulumdat-report
Photometric datasheet generator (HTML + PDF) from EULUMDAT .ldt files — orchestrates the full eulumdat-* ecosystem.
Features
- Single-page A4 datasheet from any EULUMDAT
.ldtfile - Polar intensity diagram (cd/klm) —
eulumdat-plot - Polar luminance diagram (cd/m²) + maximum luminance —
eulumdat-luminance - UGR catalogue table (CIE 117 / CIE 190, 19 rooms × 5 reflectances × 2 directions) —
eulumdat-ugr - Half-angles and FWHM per C-plane —
eulumdat-analysis - HTML output (self-contained, browser-ready A4 preview)
- PDF output via WeasyPrint (requires GTK — see installation notes)
- Custom Jinja2 template support
- CLI and Python API
Installation
pip install eulumdat-report
PDF output (optional)
PDF rendering requires WeasyPrint with GTK libraries. On Windows, follow the WeasyPrint installation guide. HTML output works on all platforms without GTK.
Quick start
CLI
# HTML + PDF (PDF skipped gracefully if GTK not installed)
eulumdat-report luminaire.ldt
# HTML only, custom output directory
eulumdat-report luminaire.ldt --no-pdf --output-dir reports/
# All options
eulumdat-report --help
Python API
from eulumdat_report.collector import ReportCollector
from eulumdat_report.renderer import ReportRenderer
from pathlib import Path
data = ReportCollector.collect("luminaire.ldt")
html = ReportRenderer.render_html(data)
Path("luminaire.html").write_text(html, encoding="utf-8")
# PDF (requires GTK)
ReportRenderer.render_pdf(data, Path("luminaire.pdf"))
CLI reference
Usage: eulumdat-report [OPTIONS] LDT_FILE
Generate a photometric datasheet (HTML/PDF) from an EULUMDAT .ldt file.
Options:
-o, --output-dir DIRECTORY Output directory [default: same as LDT_FILE]
--template FILE Custom Jinja2 HTML template
--html / --no-html Generate HTML output [default: html]
--pdf / --no-pdf Generate PDF output [default: pdf]
-v, --verbose Enable debug logging
--help Show this message and exit
Output filenames are derived from the input basename: luminaire.ldt → luminaire.html / luminaire.pdf.
Template customisation
The default template is src/eulumdat_report/templates/default.html with companion default.css.
To customise, copy both files to a local directory and pass --template to the CLI:
eulumdat-report luminaire.ldt --template my_templates/custom.html
The template receives a single data object (ReportData dataclass). The following
Jinja2 filters are available:
| Filter | Description | Example |
|---|---|---|
thousands |
Space-separated thousands (int) | 12334 → 12 334 |
fmt1 |
1 decimal place | 184.6 |
ugr_fmt |
1 decimal or — if None |
18.0 / — |
svg_responsive |
Makes SVG responsive (adds viewBox, sets width=100%) |
SVG fields are embedded inline: {{ data.svg_intensity \| svg_responsive \| safe }}.
Key data fields
data.luminaire_name # str
data.company # str
data.luminaire_number # str
data.isym # int (0–4)
data.mc, data.ng # int (C-planes, gamma angles)
data.lamp_flux # float (lm)
data.lamp_watt # float (W)
data.lorl # float (%)
data.lum_max # float | None (cd/m²)
data.svg_intensity # str | None
data.svg_luminance # str | None
data.ugr # UgrTableData | None
Dependencies
| Package | Role |
|---|---|
eulumdat-py |
EULUMDAT parser |
eulumdat-plot |
Polar intensity diagram (SVG) |
eulumdat-luminance |
Polar luminance diagram (SVG) + maximum |
eulumdat-ugr |
UGR catalogue table |
eulumdat-analysis |
Half-angles, FWHM |
jinja2 |
HTML templating |
weasyprint |
PDF rendering |
click |
CLI |
Running the tests
pip install -e ".[dev]"
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eulumdat_report-1.0.0.tar.gz.
File metadata
- Download URL: eulumdat_report-1.0.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a545e973f9b8199526cd8b7aea8c1bff32b0525f3df0cbd663309e0dfd470954
|
|
| MD5 |
0295ec0985ac4329331f0ab5180c9091
|
|
| BLAKE2b-256 |
0951ac142749b1f65a8e7f777739e0a783877360800945d6975a56f025bbcf04
|
File details
Details for the file eulumdat_report-1.0.0-py3-none-any.whl.
File metadata
- Download URL: eulumdat_report-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e5ffef4fa4c88db3bedd13b5b36d07b3c261853c943825df83247d41c17daf6
|
|
| MD5 |
645dfbd41211a818813fed662d446e3d
|
|
| BLAKE2b-256 |
093fadaff266a977ae6c0bf8587da079b93c102d3b7174064aa4dfc7e898c6c6
|