How yashwanthgodala/javalabformatter works
Java Lab Formatter is a browser-based PDF-to-text conversion tool. Users select or drop a lab PDF, submit it for extraction and Gemini-assisted structuring, then preview or download the formatted TXT. The backend also detects program filenames, handles multiple programs, and distinguishes output from error sections. The README documents image-based PDF support and the overall processing stages; the source excerpts show the Gemini calls and formatting logic, but omit parts of the upload handler.
Main entry points: app.py Upload handler · script.js Upload and preview · index.html Web page
Components 10
Web interface
- Web page
index.html - Upload and preview
script.js - Preview and download
script.js
Document processing
- Upload handler
Backend/app.py - PDF extraction
Backend/app.py - Question structuring
Backend/app.py
AI analysis
- Gemini analysis
Backend/app.py - Google Gemini
Formatted output
- TXT formatting
Backend/app.py
Other components
- PDF user
Connections 10
- PDF user → Web page: opens
README.md - Web page → Upload and preview: hosts
README.md - Upload and preview → Upload handler: uploads PDF
script.js - Upload handler → PDF extraction: extracts text
README.md - Upload handler → Gemini analysis: requests analysis
README.md - Gemini analysis → Google Gemini: uploads and analyzes
Backend/app.py - Gemini analysis → Question structuring: returns JSON
README.md - Upload handler → TXT formatting: formats questions
Backend/app.py - TXT formatting → Upload and preview: returns formatted text
script.js - Upload and preview → Preview and download: previews or downloads
script.js