Spaces:
Sleeping
Sleeping
ITU-T Report Generator - Web Interface
Web application to generate ITU-T Working Party and Question reports from a user-friendly interface.
Overview
This web app provides a frontend for the automated report generation system. Users fill a form instead of manually editing JSON configuration files.
Installation
Activate the virtual environment (from project root):
# Windows venv\Scripts\activate # Linux/Mac source venv/bin/activateInstall dependencies:
cd auto-doc-latex/web-app pip install -r requirements.txtRun the application:
python app.pyOpen in browser:
http://localhost:5000
Usage
- Select report type (Working Party or Question)
- Fill in the form fields
- Click "Generate Report"
- Download the ZIP file
- Upload to Overleaf and compile
Project Structure
web-app/
βββ app.py # Flask application entry point
βββ config.py # Configuration (paths, timeouts, etc.)
βββ requirements.txt # Python dependencies
β
βββ utils/ # Backend logic
β βββ file_handler.py # File operations (ZIP, temp directories)
β βββ report_generator.py # Wrapper for existing scripts
β βββ validators.py # Input validation
β
βββ templates/ # HTML templates (Jinja2)
β βββ base.html # Base template
β βββ index.html # Main form page
β
βββ static/ # Static assets
β βββ css/style.css # Custom styles
β βββ js/app.js # Frontend logic
β
βββ temp/ # Generated files (auto-cleaned)
Configuration Values
The following values in config.py are arbitrary choices and can be adjusted based on real-world usage:
| Parameter | Value | Rationale |
|---|---|---|
MAX_CONTENT_LENGTH |
16 MB | Arbitrary limit for CSV work programme uploads. Adjust if larger files are needed. |
TEMP_FILE_MAX_AGE |
1 hour | Arbitrary cleanup interval. Files older than 1 hour are deleted automatically. |
GENERATION_TIMEOUT |
5 minutes | Arbitrary timeout for report generation. Adjust if generation takes longer. |
Note: These values should be monitored in production and adjusted based on:
- Actual CSV file sizes encountered
- Typical report generation times
- Available disk space for temporary files
Output
The application generates a ZIP file containing:
wp_doc_template/ # or question_doc_template/
βββ main.tex # Main LaTeX document
βββ chapters/
β βββ results/ # Auto-generated content from ITU data
βββ styles/ # LaTeX styles
βββ images/ # Images
This ZIP can be directly uploaded to Overleaf for PDF compilation.
Development
- Debug mode: Enabled by default (see
config.py) - Auto-reload: Templates reload automatically on changes
- Logging: Check console output for errors
Dependencies
- Flask 3.0.0: Web framework
- beautifulsoup4 4.12.2: HTML parsing (ITU website scraping)
- pycurl 7.45.2: HTTP requests
- python-dateutil 2.8.2: Date manipulation
See requirements.txt for complete list.
Notes
- Temporary files in
temp/are automatically cleaned after 1 hour - The app uses the existing
scripts-new/Python scripts under the hood - Generated reports require manual sections to be filled (see main
README.md)