A clean, reproducible workspace designed to automate the process of executing Digital Signal Processing (DSP) lab sheets, capturing graphical results, and compiling a simple, compact 1st-year BTech student style LaTeX report with student credentials.
The workspace is structured to parse lab requirements, run simulations, and compile reports with zero manual formatting residue:
┌────────────────────────┐
│ input/labsheet.pdf │ (Raw Input)
└───────────┬────────────┘
▼ [markitdown]
┌────────────────────────┐
│ input/labsheet.md │ (Converted)
└───────────┬────────────┘
▼
┌────────────────────────┐
│ Octave Scripts │ ◄─── (Written inside src/)
└───────────┬────────────┘
▼
┌─────────────────────┴─────────────────────┐
▼ ▼
┌───────────────┐ ┌───────────────┐
│ src/*.png │ (Plots) │ src/*.txt │ (Console Logs)
└───────┬───────┘ └───────┬───────┘
│ │
└─────────────────────┬─────────────────────┘
▼
┌────────────────────────┐
│ output/report.tex │ ◄─── (LaTeX)
└───────────┬────────────┘
▼
┌────────────────────────┐
│ output/report.pdf │ ◄─── (Compiled PDF)
└────────────────────────┘
- Beginner-Style Code Generation: Octave scripts are written with simple, clear variables (e.g.,
x1,yval) without underscores, matching typical student coding styles. - One-Click Compilation: The
generate_report.pyscript executes all laboratory tasks sequentially, captures console logs, formats plots side-by-side, and compiles the final LaTeX report. - LaTeX Report Template: A simple, compact
report.textemplate designed to look like a student's basic work:- Uses narrow margins (
geometry) to keep the page count minimal. - Stamps name and roll number in a simple block at the top of the report.
- Positions plot images side-by-side using
minipageelements with minimal labels/captions to save maximum space. - Uses
listingsto import and highlight.mscript files directly from the disk. - Uses
graphicxto embed plots.
- Uses narrow margins (
- Clean Repository State: A robust
.gitignoreisolates build logs, temporary auxiliary files, and plot images so that you can reuse the directory for subsequent labsheets without cluttering Git history.
.
├── .env # User config (STUDENT_NAME/ROLL/MATLAB_DIR/INPUT_DIR/OUTPUT_DIR)
├── .env.example # Environment template file
├── .gitignore # Keeps your Git repository clean
├── README.md # This document
├── workflow.md # Implementation steps & guidelines
├── SKILL.md # LLM assistant instructions and rules
├── generate_report.py # Dynamically executes MATLAB scripts and generates LaTeX report
├── input/ # Raw labsheet inputs and converted markdown files
│ └── .gitkeep # Tracks directory in git
├── output/ # Output LaTeX reports and compiled PDFs
│ └── .gitkeep # Tracks directory in git
└── src/ # Folder containing all MATLAB/Octave scripts
├── example.m # Example task script
└── ... # Other lab tasksMake sure GNU Octave, Python 3, pdfTeX, and Microsoft MarkItDown are installed:
sudo apt install octave python3 texlive-latex-extra
pip install markitdown- Place your raw labsheet file (e.g.
labsheet.pdf) inside theinput/folder. - Convert it to markdown using
markitdown:markitdown input/labsheet.pdf -o input/labsheet.md
- Read the converted
input/labsheet.mdand write the corresponding MATLAB/Octave.mscripts in thesrc/folder. - Run the automation generator script:
Note: If you have already executed the scripts and manually placed screenshots (e.g.
python3 generate_report.py
1.1.pngforLS1_01.mand an optionalinference.txt), run with the--skip-run(or-s) flag to compile the report directly without running Octave:python3 generate_report.py --skip-run
This will run/skip scripts in src/, compile console logs, associate manual/generated screenshots, attach inferences from inference.txt, create output/report.tex, and compile the final PDF.
To process a new lab sheet:
- Place the new labsheet in
input/and convert it usingmarkitdown. - Clear old
.mfiles insrc/and paste/write the new ones. - Run
python3 generate_report.py. - Your new
output/report.pdfwill be compiled immediately with your name and roll number.