auto-reporting / web-app /USAGE.md
MATIAS Nicolas
hf version
52f789b
|
Raw
History Blame Contribute Delete
5.04 kB

ITU-T Report Generator - User Guide

πŸš€ Quick Start

1. Install Dependencies

# Activate your virtual environment (from project root)
cd ../../..  # Go to sg17collab/
venv\Scripts\activate  # Windows

# Install dependencies
cd auto-doc-latex/web-app
pip install Flask Werkzeug beautifulsoup4 lxml python-dateutil

Note: pycurl may fail on Windows. It's only needed for the backend scripts (scraping ITU website), not for the web interface itself.

2. Run the Application

cd auto-doc-latex/web-app
python app.py

You should see:

* Running on http://127.0.0.1:5000
* Debug mode: on

3. Open in Browser

Navigate to: http://localhost:5000


πŸ“ Using the Interface

Working Party Report

  1. Select "Working Party Report"
  2. Fill in:
    • Study Group (default: 17)
    • Working Party number
    • Meeting place (e.g., Geneva)
    • Start and end dates
    • Number of sessions
    • Meeting days (comma-separated, format: YYYY/MM/DD)
  3. Click "Generate Report"
  4. Wait 2-5 minutes (fetches data from ITU website)
  5. Click "Download LaTeX Files (ZIP)"

Question Report

  1. Select "Question Report"
  2. Fill in:
    • Study Group (default: 17)
    • Question number
    • Meeting place
    • Start and end dates
  3. Click "Generate Report"
  4. Wait 2-5 minutes
  5. Download the ZIP file

πŸ“¦ What You Get

The downloaded ZIP file contains a complete LaTeX project:

wp_doc_template/  (or question_doc_template/)
β”œβ”€β”€ main.tex                  # Main document
β”œβ”€β”€ chapters/
β”‚   β”œβ”€β”€ *.tex                 # Chapter files
β”‚   └── results/              # Auto-generated content
β”‚       β”œβ”€β”€ 00-variables.tex
β”‚       β”œβ”€β”€ 01-introduction-content.tex
β”‚       β”œβ”€β”€ 02-executive-summary-content.tex
β”‚       └── ...
β”œβ”€β”€ styles/                   # LaTeX style files
└── images/                   # Images

πŸ“€ Next Steps: Compile on Overleaf

  1. Go to Overleaf.com
  2. Click New Project β†’ Upload Project
  3. Upload the downloaded ZIP file
  4. Overleaf will automatically compile
  5. Click Download PDF

✏️ Manual Sections

Some sections require manual input. Look for:

  • \textit{For manual entry.} - Fill these sections manually
  • \textit{TODO: ...} - Placeholders for observations
  • \tdNumber - TD number (assigned by ITU secretariat)

Typical manual sections:

  • Executive summary details
  • Observations on liaison statements
  • Deleted work items justification

βš™οΈ Configuration

Timeout Settings

Edit config.py to adjust:

GENERATION_TIMEOUT = 300        # 5 minutes (in seconds)
TEMP_FILE_MAX_AGE = 1 hour     # Auto-cleanup age
MAX_CONTENT_LENGTH = 16 MB     # Max file upload size

Debug Mode

To disable debug mode (production):

# In app.py
app.run(
    host='127.0.0.1',
    port=5000,
    debug=False  # Change to False
)

πŸ› Troubleshooting

"Download not found or expired"

  • Files are auto-deleted after 1 hour
  • Generate the report again

"Network error"

  • Check internet connection
  • ITU website must be accessible
  • Try again in a few minutes

"Validation error"

  • Check that start date < end date
  • All required fields must be filled
  • Dates must be in YYYY/MM/DD format

Flask won't start

  • Check that port 5000 is not in use
  • Kill existing Python processes: taskkill /F /IM python.exe
  • Reinstall dependencies: pip install -r requirements.txt

πŸ”’ Security Notes

  • The app runs on localhost only (127.0.0.1)
  • Not exposed to the internet
  • Session-only (no data persistence)
  • Files auto-delete after 1 hour

πŸ“Š File Structure

web-app/
β”œβ”€β”€ app.py                    # Flask application
β”œβ”€β”€ config.py                 # Configuration
β”œβ”€β”€ requirements.txt          # Python dependencies
β”œβ”€β”€ utils/                    # Backend modules
β”‚   β”œβ”€β”€ file_handler.py       # File operations
β”‚   β”œβ”€β”€ report_generator.py   # Report generation
β”‚   └── validators.py         # Input validation
β”œβ”€β”€ templates/                # HTML templates
β”‚   └── index.html            # Main form
β”œβ”€β”€ static/                   # Frontend assets
β”‚   β”œβ”€β”€ css/style.css         # Styles
β”‚   └── js/app.js             # JavaScript logic
└── temp/                     # Generated files (auto-cleanup)

πŸ’‘ Tips

  • Dates: Use YYYY/MM/DD format (e.g., 2025/12/03)
  • Meeting Days: Comma-separated (e.g., 2025/12/10, 2025/12/11)
  • Patience: Report generation takes 2-5 minutes
  • Overleaf: Best for PDF compilation (no local LaTeX needed)
  • Manual Review: Always review generated content before submission

πŸ“ž Support

For issues with:

  • Web interface: Check this guide
  • Generated LaTeX: See main README.md in auto-doc-latex/
  • ITU scripts: Check scripts-new/ documentation