Spaces:
Sleeping
Sleeping
metadata
title: ITU Report Generator
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
ITU Report Generator
Automated generation of ITU-T meeting reports (Working Party reports and Question reports) from JSON configuration files. The system fetches data from the ITU website, generates LaTeX snippets, and produces ready-to-compile documents.
Features
- Automatic data fetching from ITU website (documents, leadership, work programme)
- LaTeX report generation for Working Party and Question reports
- Web interface for easy report generation
- Text wrapping in tables with automatic word breaking for long identifiers
- Downloadable ZIP files with descriptive naming (
report-SG17-WP1-DD-MM-YYYY.zip)
Prerequisites
- Python 3.8+
- Python packages: install with:
pip install bs4 pycurl flask - LaTeX distribution (for PDF compilation): MiKTeX (Windows) or TeX Live (Linux/macOS)
Project Structure
auto-doc-latex/
βββ scripts-new/ # Report generation scripts
β βββ generate_wp_report.py # Working Party report generator
β βββ generate_question_report.py # Question report generator
β βββ WPReport.json # Example WP config
β βββ questionReport.json # Example Question config
β βββ common/ # Shared modules
β βββ config.py # Configuration loading
β βββ itu_api.py # ITU website data fetching
β βββ latex.py # LaTeX formatting helpers
β βββ models.py # Data models
β βββ utils.py # Utility functions
β
βββ web-app/ # Flask web application
β βββ app.py # Main Flask application
β βββ config.py # Web app configuration
β βββ requirements.txt # Python dependencies
β βββ templates/ # HTML templates
β βββ static/ # CSS and JavaScript
β βββ utils/ # Web app utilities
β
βββ wp_doc_template/ # WP report LaTeX template
β βββ main.tex # Main document entry point
β βββ chapters/ # Chapter .tex files
β β βββ variables/ # Auto-generated LaTeX snippets
β βββ styles/ # LaTeX style files
β
βββ question_doc_template/ # Question report LaTeX template
βββ main.tex
βββ chapters/
β βββ 00-frontcover.tex
β βββ 01-introduction.tex
β βββ 02-executive-summary.tex
β βββ 03-report-of-interim.tex
β βββ 04-intellectual-property.tex
β βββ 05-discussions.tex
β βββ 06-draft-recommendations.tex
β βββ 07-non-normative-text.tex
β βββ 08-outgoing-liaison-statements.tex
β βββ 09-work-programme.tex
β βββ 10-candidate-work-items.tex
β βββ 11-planned-interim-meetings.tex
β βββ 12-scheduled-meetings.tex
β βββ annex-a.tex, annex-b.tex, annex-c.tex
β βββ variables/ # Auto-generated LaTeX snippets
βββ styles/
Usage
Option 1: Web Interface (Recommended)
Start the web application:
cd web-app pip install -r requirements.txt python app.pyOpen your browser to
http://localhost:5000Fill in the form:
- Select report type (Working Party or Question)
- Enter Study Group number, Working Party/Question number
- Set meeting dates and location
Click "Generate Report" to download a ZIP file containing the LaTeX template with generated content
Option 2: Command Line
Step 1: Create a JSON configuration file
For a Working Party report:
{
"group": 17,
"workingParty": 1,
"place": "Geneva",
"start": "2025/12/03",
"end": "2025/12/11",
"next_meeting": "2026/07/01"
}
For a Question report:
{
"group": 17,
"question": 10,
"place": "Geneva",
"start": "2025/12/03",
"end": "2025/12/09",
"next_meeting": "2026/07/01"
}
Step 2: Run the generation script
cd scripts-new
# For a Working Party report
python generate_wp_report.py WPReport.json
# For a Question report
python generate_question_report.py questionReport.json
The script will:
- Read the JSON configuration
- Fetch meeting data from the ITU website
- Generate LaTeX snippet files in the template's
chapters/variables/directory
Step 3: Fill in manual sections
Some sections require manual input. Look for:
\textit{For manual entry.}- sections to write by hand\textit{TODO: write the observation here}- placeholders for observations(manual entry)- editor fields to complete
Step 4: Compile the PDF
Using Overleaf: (Recommended)
- Compress the template directory into a
.zipfile - Upload to Overleaf β New Project β Upload Project
- Set
main.texas the main document - Click Recompile β Download PDF
Using local LaTeX:
cd wp_doc_template # or question_doc_template
latexmk -pdf main.tex
Configuration Reference
Working Party Report
| Field | Required | Description |
|---|---|---|
group |
Yes | Study Group number (e.g., 17) |
workingParty |
Yes | Working Party number (e.g., 1) |
start |
Yes | Meeting start date (YYYY/MM/DD) |
place |
yes | Meeting location |
end |
yes | Meeting end date (YYYY/MM/DD) |
next_meeting |
No | Next meeting date (for filtering candidate work items) |
Question Report
| Field | Required | Description |
|---|---|---|
group |
Yes | Study Group number |
question |
Yes | Question number (e.g., 10) |
start |
Yes | Meeting start date (YYYY/MM/DD) |
place |
yes | Meeting location |
end |
yes | Meeting end date (YYYY/MM/DD) |
next_meeting |
no | Next meeting date (for filtering candidate work items) |
Template Variables
Each chapter .tex file includes variables from the chapters/variables/ directory. Comments in the template files indicate:
- Variable source:
% Variable: \variableName -> chapters/variables/filename.tex - Table row format:
% Row template: Col1 & Col2 & Col3 \\ \hline
Troubleshooting
- Network errors: Ensure internet access and ITU website (
www.itu.int) is reachable - Missing
pycurl: On Windows, install a precompiled wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl - LaTeX errors: Run
latexmk -pdf -interaction=nonstopmode main.texfor detailed error messages - Long text overflow: Work item names use
\seqsplit{}to break anywhere in columns