Skip to content

AbelAbraham77/PyLaTeX-Report-Generation-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyLaTeX Beam Report Generator

Generate a professional engineering PDF report from Excel force data using PyLaTeX and TikZ/pgfplots.

What this produces

  • Title page and table of contents
  • Introduction section with embedded simply supported beam image
  • Input table recreated using LaTeX tabular text (not an image)
  • Shear Force Diagram (SFD) vector plot using TikZ/pgfplots
  • Bending Moment Diagram (BMD) vector plot using TikZ/pgfplots
  • Summary section defining shear force and bending moment

Project structure

.
|-- assets/
|   `-- Simply Supported Beam.png
|-- data/
|   `-- Force Table.xlsx
|-- output/
|   |-- engineering_report.pdf
|   `-- engineering_report.tex
`-- src/
    `-- generate_report.py

Requirements

  • Python 3.10+
  • Python packages: pandas, numpy, pylatex
  • A LaTeX distribution with latexmk, TikZ, and pgfplots

Install Python dependencies:

pip install pandas numpy pylatex

Usage

Run from repository root:

python src/generate_report.py --input "data/Force Table.xlsx" --output output/engineering_report.pdf

Arguments (optional):

  • --input default: data/Force Table.xlsx
  • --output default: output/engineering_report.pdf
  • --title, --subtitle, --author, --institution, --project-name, --report-date for title-page customization
  • --x-unit, --shear-unit, --moment-unit for unit-consistent table/plot labels
  • --clean-temp removes .aux, .fls, .fdb_latexmk, .log, .toc, .out, .synctex.gz after PDF generation

Example with bonus CLI options:

python src/generate_report.py \
  --input "data/Force Table.xlsx" \
  --output output/engineering_report.pdf \
  --author "Your Name" \
  --project-name "OSDAG Screening Assignment" \
  --shear-unit "kN" \
  --moment-unit "kN*m" \
  --clean-temp

Input format

The Excel file must contain these headers:

  • x
  • Shear force
  • Bending Moment

Rows must be numeric and x must be strictly increasing.

Notes on report quality

  • Coordinates are generated programmatically and rendered as vector TikZ plots.
  • Data checks include missing/non-numeric values and monotonic x positions.
  • A data-quality note is added when abrupt shear changes are detected.
  • Bonus features included: command-line customization, unit-consistent labeling, and optional build-artifact cleanup.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors