- Created complete PHP web interface in web/ directory - SSO authentication using same system as NANO-RESEARCH app - Date selection form with auto-populated current date - Real-time Python output streaming to browser - Secure PDF download with authentication - Beautiful responsive UI with Montserrat font - Fixed INSPIRATION category (column H doesn't exist - only 6 categories) - Updated config to reflect correct 6 categories (A-G columns only) - Backend streaming output from Python script - Complete documentation in web/README.md - Environment variable loading for SSO configuration
36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* Configuration file for Newsroom Report Generator Web Interface
|
|
*/
|
|
|
|
// Load environment variables from .env file
|
|
if (file_exists(__DIR__ . '/env_loader.php')) {
|
|
require_once __DIR__ . '/env_loader.php';
|
|
}
|
|
|
|
// Path to Python script and project root
|
|
define('PYTHON_SCRIPT', dirname(__DIR__) . '/newsroom_report.py');
|
|
define('PYTHON_VENV', dirname(__DIR__) . '/venv/bin/python');
|
|
define('PROJECT_ROOT', dirname(__DIR__));
|
|
define('REPORTS_DIR', dirname(__DIR__) . '/reports');
|
|
|
|
// MSAL / Azure AD SSO Configuration
|
|
// Use same SSO settings as NANO-RESEARCH app
|
|
if (!defined('SSO_ENABLED')) {
|
|
define('SSO_ENABLED', getenv('SSO_ENABLED') === 'true');
|
|
}
|
|
if (!defined('SSO_TENANT_ID')) {
|
|
define('SSO_TENANT_ID', getenv('SSO_TENANT_ID') ?: '');
|
|
}
|
|
if (!defined('SSO_CLIENT_ID')) {
|
|
define('SSO_CLIENT_ID', getenv('SSO_CLIENT_ID') ?: '');
|
|
}
|
|
|
|
// Session configuration
|
|
ini_set('session.gc_maxlifetime', 3600); // 1 hour
|
|
ini_set('session.cookie_lifetime', 3600);
|
|
|
|
// Error reporting
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', 1);
|
|
ini_set('log_errors', 1);
|